2 Widget that holds the game tiles.
5 from naja.constants import BOARD_SIZE, TILE_SIZE
7 from .base import Widget
8 from .tile import TileWidget
11 class BoardWidget(Widget):
13 Widget which holds all the tiles that make up the gameboard.
15 def __init__(self, pos, tiles=None):
16 super(BoardWidget, self).__init__(pos, BOARD_SIZE)
17 # FIXME: Placeholder logic
21 tile_pos = (pos[0] + x * TILE_SIZE[0],
22 pos[1] + y * TILE_SIZE[1])
23 self._tiles.append(TileWidget(tile_pos, None))
26 for tile in self._tiles:
28 self.size = BOARD_SIZE
30 def draw(self, surface):
31 for tile in self._tiles: