player = Player.import_player(state.pop('player'))
board_locations = cls.import_board_locations(
state.pop('board_locations'))
- return cls(state, player, board_locations)
+ board = cls(state, player, board_locations)
+ player.set_gameboard(board)
+ return board
def export(self):
data = {
self.gameboard = gameboard
@classmethod
- def import_player(cls, definition):
+ def import_player(cls, definition, gameboard=None):
return cls(
definition['bits'],
tuple(definition['position']),
- definition['movement_mode'])
+ definition['movement_mode'],
+ gameboard=gameboard)
def export(self):
return {