diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-08-12 11:07:41 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-08-12 11:07:41 +0200 |
commit | 6935a0c82606b95391dfd76c01e393ca99d6bf77 (patch) | |
tree | 91207be0c5e2e4e0a33f3492b719bd3abc2e25dc /src/input | |
parent | a760bc7543b186714b11648e8be515dcdfc49b95 (diff) |
Test for iron curtain availability and normal towers
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/json.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/input/json.rs b/src/input/json.rs index 32f98d0..544e5ed 100644 --- a/src/input/json.rs +++ b/src/input/json.rs @@ -21,12 +21,19 @@ pub fn read_bitwise_state_from_file(filename: &str) -> Result<bitwise_engine::Bi #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct State { + game_details: GameDetails, players: Vec<Player>, game_map: Vec<Vec<GameCell>>, } #[derive(Deserialize)] #[serde(rename_all = "camelCase")] +struct GameDetails { + round: u16 +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] struct Player { player_type: char, energy: u16, @@ -149,7 +156,8 @@ impl State { bitwise_engine::BitwiseGameState::new( player, opponent, - player_buildings, opponent_buildings + player_buildings, opponent_buildings, + self.game_details.round ) } |