From: Neil Date: Sun, 11 May 2014 21:11:06 +0000 (+0200) Subject: Add property to get at board_locations X-Git-Tag: 0.1~377 X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=commitdiff_plain;h=00d93ae60dcfb960870d29e8e64ad38d62de935d Add property to get at board_locations --- 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: