self.health = state['health']
self.wins = state['wins']
self.locations = [item.copy() for item in state['locations']]
self.health = state['health']
self.wins = state['wins']
self.locations = [item.copy() for item in state['locations']]
'max_health': self.max_health,
'health': self.health,
'wins_required': self.wins_required,
'max_health': self.max_health,
'health': self.health,
'wins_required': self.wins_required,
'puzzle': self.puzzle,
'player': self.player.export(),
'board_locations': self.export_board_locations(),
'puzzle': self.puzzle,
'player': self.player.export(),
'board_locations': self.export_board_locations(),
def replace_card(self, position):
location = LocationCard.new_location(choice(self.locations).copy())
self.board_locations[position] = location
def replace_card(self, position):
location = LocationCard.new_location(choice(self.locations).copy())
self.board_locations[position] = location
if ROTATION[direction] == ROTATION.CLOCKWISE:
new_positions = locations_to_rotate[1:] + [locations_to_rotate[0]]
elif ROTATION[direction] == ROTATION.ANTICLOCKWISE:
if ROTATION[direction] == ROTATION.CLOCKWISE:
new_positions = locations_to_rotate[1:] + [locations_to_rotate[0]]
elif ROTATION[direction] == ROTATION.ANTICLOCKWISE:
from naja.events import SceneChangeEvent
from naja.scenes.lose import LoseScene
from naja.scenes.win import WinScene
from naja.events import SceneChangeEvent
from naja.scenes.lose import LoseScene
from naja.scenes.win import WinScene