projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8daea1
)
Add property to get at board_locations
author
Neil
<neil@dip.sun.ac.za>
Sun, 11 May 2014 21:11:06 +0000
(23:11 +0200)
committer
Neil
<neil@dip.sun.ac.za>
Sun, 11 May 2014 21:30:25 +0000
(23:30 +0200)
naja/gamestate.py
patch
|
blob
|
history
naja/widgets/tile.py
patch
|
blob
|
history
diff --git
a/naja/gamestate.py
b/naja/gamestate.py
index 71abcc73a00eff7982eedadd5cb726120f4b3450..bbe92d362fa47c9a316afd4d4d52b9fd0957c94a 100644
(file)
--- a/
naja/gamestate.py
+++ b/
naja/gamestate.py
@@
-28,3
+28,7
@@
class GameState(object):
@property
def player(self):
return self.gameboard.player
+
+ @property
+ def board_locations(self):
+ return self.gameboard.board_locations
diff --git
a/naja/widgets/tile.py
b/naja/widgets/tile.py
index cba4658e147b59558cba4e28709b9e0e77a359e2..63fbafef09f054666a42234929a1145ad524bf53 100644
(file)
--- a/
naja/widgets/tile.py
+++ b/
naja/widgets/tile.py
@@
-28,7
+28,7
@@
class TileWidget(Widget):
True, [(1, 1), (1, 95), (95, 95), (95, 1)], 2)
self.surface.convert_alpha(pygame.display.get_surface())
# Look up the required bits on the board location
- card = self.state.
gameboard.
board_locations[self.board_pos]
+ card = self.state.board_locations[self.board_pos]
bits = []
for action in card.actions:
if action.required_bits: