From 4354fb84c1cc1c778e3e7d2a4d487fb1c86a8ad4 Mon Sep 17 00:00:00 2001 From: Jeremy Thurgood Date: Mon, 12 May 2014 14:12:04 +0200 Subject: [PATCH] More location deck things. --- data/location_decks/test.yaml | 26 ++++++++++++++++---------- naja/gamestate.py | 4 ++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/data/location_decks/test.yaml b/data/location_decks/test.yaml index 75f8690..b5df649 100644 --- a/data/location_decks/test.yaml +++ b/data/location_decks/test.yaml @@ -1,10 +1,16 @@ -- actions: [] -- actions: - - action_class: 'DoNothing' - required_bits: [CYAN] -- actions: - - action_class: 'DoNothing' - required_bits: [YELLOW] -- actions: - - action_class: 'DoNothing' - required_bits: [YELLOW, MAGENTA] +description: "Test location deck." +cards: + - actions: [] + - actions: + - action_class: 'LoseHealthOrMSB' + required_bits: [] + - action_class: 'ToggleBits' + required_bits: [CYAN] + - action_class: 'SetBits' + required_bits: [YELLOW, MAGENTA] + - actions: + - action_class: 'ToggleBits' + required_bits: [YELLOW] + - actions: + - action_class: 'SetBits' + required_bits: [YELLOW, CYAN] diff --git a/naja/gamestate.py b/naja/gamestate.py index c812c56..c8bbbc7 100644 --- a/naja/gamestate.py +++ b/naja/gamestate.py @@ -21,8 +21,8 @@ class GameState(object): def __init__(self): # This is a very simple deck to allow testing more drawing logic # on tiles. These will need to be replaced with better stuff. - self.gameboard = GameBoard.new_game( - locations_definition=load_location_deck('test')) + locations_deck = load_location_deck('test') + self.gameboard = GameBoard.new_game(locations_deck['cards']) @property def player(self): -- 2.34.1