Fix loading save games (by telling the loaded player about the board they're on)...
[naja.git] / naja / player.py
index 892fa05b32f88c117a59f98d6025a7b0821a5469..58cb8245e6c5f0f3b466f25bf2d007dba2e544ef 100644 (file)
@@ -70,11 +70,12 @@ class Player(object):
         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 {