- if ev.key in (pgl.K_RETURN, pgl.K_KP_ENTER):
- self.card.actions[self.chosen].perform_action(
- self.state.gameboard, self.card)
+ if ev.key in KEYS.SELECT:
+ action = self.card.actions[self.chosen]
+ if not action.check_available(self.state.gameboard.player):
+ print "BEEP!"
+ return True
+ action.perform_action(self.state.gameboard, self.card)