X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fwidgets%2Ftile.py;h=4a88e121fb01dfeb688ec68c119e7e52b6a0595d;hb=67e79ba3fbe96590efa50a73fe983c2810efdd0f;hp=a152f765a102de9511e030b84ec4285337ad04d3;hpb=ee32cda1beebfdc07234f393bf39bb948b36a39a;p=naja.git diff --git a/naja/widgets/tile.py b/naja/widgets/tile.py index a152f76..4a88e12 100644 --- a/naja/widgets/tile.py +++ b/naja/widgets/tile.py @@ -8,9 +8,9 @@ from naja.widgets.base import Widget BIT_MAP = { - BITS['CYAN']: 'board/tile_cyan.png', - BITS['MAGENTA']: 'board/tile_magenta.png', - BITS['YELLOW']: 'board/tile_yellow.png', + BITS.CYAN: 'board/tile_cyan.png', + BITS.MAGENTA: 'board/tile_magenta.png', + BITS.YELLOW: 'board/tile_yellow.png', } @@ -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: @@ -47,4 +47,4 @@ class TileWidget(Widget): y_offset += 32 def draw(self, surface): - surface.blit(self.surface, self.rect) + surface.blit(self.surface, self.pos)