Fix loading of old saves.
authorJeremy Thurgood <firxen@gmail.com>
Fri, 16 May 2014 21:02:10 +0000 (23:02 +0200)
committerJeremy Thurgood <firxen@gmail.com>
Fri, 16 May 2014 21:02:10 +0000 (23:02 +0200)
naja/gameboard.py

index 18ecaf5c62d369af2f8a3d32a0493b45b0926923..e02dd3d51b16fc0d0afebfbc5584856f1db64d2a 100644 (file)
@@ -19,7 +19,7 @@ class GameBoard(object):
         self.health = state['health']
         self.wins = state['wins']
         self.locations = [item.copy() for item in state['locations']]
-        self.puzzle = state['puzzle']
+        self.puzzle = state.get('puzzle', False)
         self.player = player
         self.board_locations = board_locations
         self.player_mode = EXAMINE