projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More location deck things.
[naja.git]
/
naja
/
widgets
/
board.py
diff --git
a/naja/widgets/board.py
b/naja/widgets/board.py
index 1f59f015f1cb1eacd5bb68de952986942c160b3c..c5eef2ac50ae00784e120fc2a70fc180fa5a7733 100644
(file)
--- a/
naja/widgets/board.py
+++ b/
naja/widgets/board.py
@@
-3,16
+3,15
@@
Widget that holds the game tiles.
"""
from naja.constants import BOARD_SIZE, TILE_SIZE
"""
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.
"""
class BoardWidget(Widget):
"""
Widget which holds all the tiles that make up the gameboard.
"""
- def __init__(self, pos,
tiles=Non
e):
+ def __init__(self, pos,
stat
e):
super(BoardWidget, self).__init__(pos, BOARD_SIZE)
# FIXME: Placeholder logic
self._tiles = []
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])
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:
def prepare(self):
for tile in self._tiles: