import pygame
import pygame.locals as pgl
-from naja.constants import TILE_SIZE, BITS, LOCK_HEIGHT
+from naja.constants import TILE_SIZE, BITS, LOCK_HEIGHT, MOVE
from naja.resources import resources
from naja.resources.mutators import EIGHT_BIT
from naja.widgets.base import Widget
def prepare(self):
# Draw background
x, y = abs(self.board_pos[0] - 2), abs(self.board_pos[1] - 2)
- if (x + y) % 2 == 0:
+ legal_move = (self.board_pos in self.state.player.legal_moves())
+ if self.state.gameboard.player_mode == MOVE and legal_move:
+ bg = resources.get_image('board/tile_available.png',
+ transforms=(EIGHT_BIT,))
+ elif (x + y) % 2 == 0:
bg = resources.get_image('board/tile_2.png',
transforms=(EIGHT_BIT,))
else: