We set defaults in new_game() don't pass parameters that aren't needed
authorStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 19:10:46 +0000 (21:10 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 19:11:00 +0000 (21:11 +0200)
naja/options.py
naja/scenes/puzzlelist.py

index 73129490cf7903e4796543968f13248495c97353..498a979d8ecae6299cbf4d5d280b89bd6bfb2a46 100644 (file)
@@ -30,7 +30,7 @@ def load_deck(parser, deck):
     '''
     from naja.gamestate import GameState
     try:
-        state = GameState.new(deck=deck, max_health=4, wins_required=4)
+        state = GameState.new(deck=deck)
     except:
         if options.debug:
             raise
index f9c51c1fa13b1a0dbddf5bc9126247ae1a7e1adb..670b6b15cad540f4c306ea5739b17225b832114c 100644 (file)
@@ -48,11 +48,8 @@ class PuzzleListScene(Scene):
 
     def start_puzzle_game(self, event, puzzle=None, deck=None):
         from naja.scenes.game import GameScene
-        max_health = deck.get('max_health', 4)
-        wins_required = deck.get('wins_required', 4)
         level = 'puzzles/%s' % puzzle
-        state = GameState.new(deck=level, max_health=max_health,
-                              wins_required=wins_required)
+        state = GameState.new(deck=level)
         LoadGameEvent.post(state=state)
         SceneChangeEvent.post(GameScene)