summaryrefslogtreecommitdiff
path: root/src/input/json.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-06-09 10:04:47 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-06-09 10:04:47 +0200
commit9f0838006905fd039c4e0d87a69338f33e75246d (patch)
treeb0aa5a7e3a36c3bf9c1d4edb6a7db6d1d9b4b46f /src/input/json.rs
parent243a42b1fb8959e740aa21a79df78e78262e683c (diff)
Added max building price to game settings
Diffstat (limited to 'src/input/json.rs')
-rw-r--r--src/input/json.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/input/json.rs b/src/input/json.rs
index 3a3fbf2..ed00984 100644
--- a/src/input/json.rs
+++ b/src/input/json.rs
@@ -110,13 +110,13 @@ struct MissileState {
impl State {
fn to_engine_settings(&self) -> engine::settings::GameSettings {
- 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.buildings_stats.energy.to_engine(),
- defence: self.game_details.buildings_stats.defense.to_engine(),
- attack: self.game_details.buildings_stats.attack.to_engine(),
- }
+ engine::settings::GameSettings::new(
+ engine::geometry::Point::new(self.game_details.map_width, self.game_details.map_height),
+ self.game_details.round_income_energy,
+ self.game_details.buildings_stats.energy.to_engine(),
+ self.game_details.buildings_stats.defense.to_engine(),
+ self.game_details.buildings_stats.attack.to_engine(),
+ )
}
fn to_engine(&self, settings: &engine::settings::GameSettings) -> engine::GameState {