Fix loading save games (by telling the loaded player about the board they're on)...
[naja.git] / naja / gameboard.py
index ff65c2517e4d63c1a77ce46c1a21ec25661ec50f..934aa3d15b1d308cb12d59d37e6e5d1645a0deae 100644 (file)
@@ -86,7 +86,9 @@ class GameBoard(object):
         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 = {