From: Stefano Rivera Date: Sat, 17 May 2014 19:10:46 +0000 (+0200) Subject: We set defaults in new_game() don't pass parameters that aren't needed X-Git-Tag: 0.1~34^2~11 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=68445d365c053ecfad14680003a6fce97453ef13;p=naja.git We set defaults in new_game() don't pass parameters that aren't needed --- 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)