From 6935a0c82606b95391dfd76c01e393ca99d6bf77 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sun, 12 Aug 2018 11:07:41 +0200 Subject: Test for iron curtain availability and normal towers --- src/input/json.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/input/json.rs') 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,10 +21,17 @@ pub fn read_bitwise_state_from_file(filename: &str) -> Result, game_map: Vec>, } +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct GameDetails { + round: u16 +} + #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct Player { @@ -149,7 +156,8 @@ impl State { bitwise_engine::BitwiseGameState::new( player, opponent, - player_buildings, opponent_buildings + player_buildings, opponent_buildings, + self.game_details.round ) } -- cgit v1.2.3