Factor out EIGHT_BIT_SCALE.
[naja.git] / naja / widgets / board.py
index 1f59f015f1cb1eacd5bb68de952986942c160b3c..c5eef2ac50ae00784e120fc2a70fc180fa5a7733 100644 (file)
@@ -3,16 +3,15 @@ Widget that holds the game tiles.
 """
 
 from naja.constants import BOARD_SIZE, TILE_SIZE
-
-from .base import Widget
-from .tile import TileWidget
+from naja.widgets.base import Widget
+from naja.widgets.tile import TileWidget
 
 
 class BoardWidget(Widget):
     """
     Widget which holds all the tiles that make up the gameboard.
     """
-    def __init__(self, pos, tiles=None):
+    def __init__(self, pos, state):
         super(BoardWidget, self).__init__(pos, BOARD_SIZE)
         # FIXME: Placeholder logic
         self._tiles = []
@@ -20,7 +19,7 @@ class BoardWidget(Widget):
             for x in range(0, 5):
                 tile_pos = (pos[0] + x * TILE_SIZE[0],
                             pos[1] + y * TILE_SIZE[1])
-                self._tiles.append(TileWidget(tile_pos, None))
+                self._tiles.append(TileWidget(tile_pos, state, (x, y)))
 
     def prepare(self):
         for tile in self._tiles: