diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-06-09 10:04:47 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-06-09 10:04:47 +0200 |
commit | 9f0838006905fd039c4e0d87a69338f33e75246d (patch) | |
tree | b0aa5a7e3a36c3bf9c1d4edb6a7db6d1d9b4b46f /src/input/textmap.rs | |
parent | 243a42b1fb8959e740aa21a79df78e78262e683c (diff) |
Added max building price to game settings
Diffstat (limited to 'src/input/textmap.rs')
-rw-r--r-- | src/input/textmap.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/input/textmap.rs b/src/input/textmap.rs index 79fbe7f..5481770 100644 --- a/src/input/textmap.rs +++ b/src/input/textmap.rs @@ -14,10 +14,10 @@ pub fn read_state_from_file(filename: &str) -> Result<(GameSettings, GameState), //TODO actually read the right file and parse it? - let engine_settings = GameSettings { - size: Point::new(8,4), - energy_income: 5, - energy: BuildingSettings { + let engine_settings = GameSettings::new( + Point::new(8,4), + 5, + BuildingSettings { price: 20, health: 5, construction_time: 2-2, @@ -26,7 +26,7 @@ pub fn read_state_from_file(filename: &str) -> Result<(GameSettings, GameState), weapon_cooldown_period: 0, energy_generated_per_turn: 3 }, - defence: BuildingSettings { + BuildingSettings { price: 30, health: 20, construction_time: 4-2, @@ -35,7 +35,7 @@ pub fn read_state_from_file(filename: &str) -> Result<(GameSettings, GameState), weapon_cooldown_period: 0, energy_generated_per_turn: 0 }, - attack: BuildingSettings { + BuildingSettings { price: 30, health: 5, construction_time: 2-2, @@ -44,7 +44,7 @@ pub fn read_state_from_file(filename: &str) -> Result<(GameSettings, GameState), weapon_cooldown_period: 3, energy_generated_per_turn: 0 } - }; + ); let engine_state = GameState::new( Player { energy: 20, |