From 00d93ae60dcfb960870d29e8e64ad38d62de935d Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 11 May 2014 23:11:06 +0200 Subject: [PATCH] Add property to get at board_locations --- naja/gamestate.py | 4 ++++ naja/widgets/tile.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/naja/gamestate.py b/naja/gamestate.py index 71abcc7..bbe92d3 100644 --- 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 cba4658..63fbafe 100644 --- 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: -- 2.34.1