'''
Load a save game and store it in parser.values.game_state.
'''
+ from naja.scenes.load_save import SaveGameSlot
if not (0 <= slot_num <= 7):
parser.error("--load accepts a slot number from 0 to 7.")
- from naja.scenes.load_save import SaveGameSlot
state = SaveGameSlot(slot_num).load()
if state is None:
raise parser.error(
Create a new game for a specific deck and store it in
parser.values.game_state.
'''
- raise optparse.OptionalValueError(
- "Deck loading not implemented.")
+ from naja.gamestate import GameState
+ try:
+ state = GameState.new(deck=deck, max_health=4, wins_required=4)
+ except:
+ parser.error("Could not load deck %r" % (deck,))
+ options.game_state = state
def parse_args(args):