From d5165efe843b7a1543f425087703266fd09501f4 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 16 May 2018 22:47:17 +0200 Subject: Changed types to assume health can't be more than the hundred in the first round --- src/json.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/json.rs') diff --git a/src/json.rs b/src/json.rs index 239a351..2eb2278 100644 --- a/src/json.rs +++ b/src/json.rs @@ -48,9 +48,9 @@ struct BuildingStats { #[serde(rename_all = "camelCase")] struct BuildingBlueprint { price: u16, - health: u16, + health: u8, construction_time: u8, - weapon_damage: u16, + weapon_damage: u8, weapon_speed: u8, weapon_cooldown_period: u8, energy_generated_per_turn: u16, @@ -63,7 +63,7 @@ struct BuildingBlueprint { struct Player { player_type: char, energy: u16, - health: u16, + health: u8, //hits_taken: u32, //score: u32 } @@ -81,10 +81,10 @@ struct GameCell { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct BuildingState { - health: u16, + health: u8, construction_time_left: i8, //price: u16, - weapon_damage: u16, + weapon_damage: u8, weapon_speed: u8, weapon_cooldown_time_left: u8, weapon_cooldown_period: u8, @@ -100,7 +100,7 @@ struct BuildingState { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct MissileState { - damage: u16, + damage: u8, speed: u8, x: u8, y: u8, -- cgit v1.2.3