Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/blocku.py
diff options
context:
space:
mode:
Diffstat (limited to 'blocku.py')
-rw-r--r--blocku.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/blocku.py b/blocku.py
index 058eb93..abe122c 100644
--- a/blocku.py
+++ b/blocku.py
@@ -3,18 +3,25 @@ import pygame
#import gtk
class Block:
- pass
+ def __init__(self, north=None, east=None, south=None, west=None):
+ self.north = north
+ self.east = east
+ self.south = south
+ self.west = west
class Puzzle:
- def __init__(self, width, height, rule, edges, blocks=None):
- self.width = width
- self.height = height
+ def __init__(self, rule):
self.rule = rule
- self.edges = edges
- self.blocks = blocks or []
+ self.blocks = {}
- def add_block(self, block):
- self.blocks.push(block)
+ def add_block(self, block, coords):
+ self.blocks[coords] = block
+
+ def get_blocks(self):
+ return self.blocks
+
+ def shuffle(self):
+ pass
class Game:
def __init__(self):