From 68445d365c053ecfad14680003a6fce97453ef13 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 17 May 2014 21:10:46 +0200 Subject: [PATCH] We set defaults in new_game() don't pass parameters that aren't needed --- naja/options.py | 2 +- naja/scenes/puzzlelist.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/naja/options.py b/naja/options.py index 7312949..498a979 100644 --- a/naja/options.py +++ b/naja/options.py @@ -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 diff --git a/naja/scenes/puzzlelist.py b/naja/scenes/puzzlelist.py index f9c51c1..670b6b1 100644 --- a/naja/scenes/puzzlelist.py +++ b/naja/scenes/puzzlelist.py @@ -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) -- 2.34.1