self.health -= 1
# TODO: Check win/lose
+ def replace_card(self, position):
+ location = LocationCard.new_location(choice(self.locations).copy())
+ self.board_locations[position] = location
+
def change_mode(self):
"""Advance to the next mode"""
if self.player_mode == MOVE:
return super(InfoAreaWidget, self).handle_event(ev)
if ev.type == pgl.KEYDOWN:
if ev.key in KEYS.SELECT:
+ player = self.state.gameboard.player
action = self.card.actions[self.chosen]
- if not action.check_available(self.state.gameboard.player):
+ if not action.check_available(player):
print "BEEP!"
else:
action.perform_action(self.state.gameboard, self.card)
+ self.state.gameboard.replace_card(player.position)
self.state.gameboard.change_mode()
return finish_event()
if ev.key in KEYS.UP: