YAML knows about integers. Not tuples
authorStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 17:01:37 +0000 (19:01 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 17:02:29 +0000 (19:02 +0200)
naja/gameboard.py

index d70a49890f99fc4a183aed48813ca6b7d53b8378..9855546c905a0a96019ecd60861132400cbbe7b6 100644 (file)
@@ -46,9 +46,7 @@ class GameBoard(object):
             puzzle_defaults = deck.get('defaults', {})
             for k, v in puzzle_defaults.iteritems():
                 if isinstance(v, list):
-                    puzzle_defaults[k] = [int(x) for x in v]
-                else:
-                    puzzle_defaults[k] = int(v)
+                    puzzle_defaults[k] = tuple(v)
             defaults.update(puzzle_defaults)
 
         if initial_bits is None: