self.player = player
self.board_locations = board_locations
self.player_mode = state.get('player_mode', EXAMINE)
+ self.has_cheated = state.get('cheater', options.cheat_enabled)
@classmethod
def new_game(cls, deck,
return cls(state, player, board_locations)
def export(self):
- return {
+ data = {
'max_health': self.max_health,
'health': self.health,
'wins_required': self.wins_required,
'board_locations': self.export_board_locations(),
'player_mode': self.player_mode,
}
+ if self.has_cheated:
+ data['cheater'] = True
+ return data
@classmethod
def import_locations(cls, locations_definition):