Add property to get at board_locations
authorNeil <neil@dip.sun.ac.za>
Sun, 11 May 2014 21:11:06 +0000 (23:11 +0200)
committerNeil <neil@dip.sun.ac.za>
Sun, 11 May 2014 21:30:25 +0000 (23:30 +0200)
naja/gamestate.py
naja/widgets/tile.py

index 71abcc73a00eff7982eedadd5cb726120f4b3450..bbe92d362fa47c9a316afd4d4d52b9fd0957c94a 100644 (file)
@@ -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
index cba4658e147b59558cba4e28709b9e0e77a359e2..63fbafef09f054666a42234929a1145ad524bf53 100644 (file)
@@ -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: