From: Jeremy Thurgood Date: Mon, 12 May 2014 12:12:04 +0000 (+0200) Subject: More location deck things. X-Git-Tag: 0.1~356 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=4354fb84c1cc1c778e3e7d2a4d487fb1c86a8ad4;p=naja.git More location deck things. --- 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):