summaryrefslogtreecommitdiff
path: root/src/json.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-05-12 17:39:06 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-05-12 17:39:06 +0200
commit97880f6a368085e9a409f1fb0030791a4a65005c (patch)
tree85190874620d136a4797bd0d4571de6fce9859b9 /src/json.rs
parentf43fa101538c6b4ae2531bb8d27c793e6b7579ec (diff)
Initial stab at monte carlo implementation
Doesn't seem to be working quite right... just sits there accumulating energy.
Diffstat (limited to 'src/json.rs')
-rw-r--r--src/json.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/json.rs b/src/json.rs
index 541b479..10c3ab8 100644
--- a/src/json.rs
+++ b/src/json.rs
@@ -30,7 +30,7 @@ struct GameDetails {
map_width: u8,
map_height: u8,
round_income_energy: u16,
- building_stats: BuildingStats
+ buildings_stats: BuildingStats
}
#[derive(Deserialize)]
@@ -110,9 +110,9 @@ impl State {
engine::settings::GameSettings {
size: engine::geometry::Point::new(self.game_details.map_width, self.game_details.map_height),
energy_income: self.game_details.round_income_energy,
- energy: self.game_details.building_stats.energy.to_engine(),
- defence: self.game_details.building_stats.defense.to_engine(),
- attack: self.game_details.building_stats.attack.to_engine(),
+ energy: self.game_details.buildings_stats.energy.to_engine(),
+ defence: self.game_details.buildings_stats.defense.to_engine(),
+ attack: self.game_details.buildings_stats.attack.to_engine(),
}
}