summaryrefslogtreecommitdiff
path: root/src/engine/expressive_engine.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-07-06 00:30:42 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-07-06 00:30:42 +0200
commitf7eef79cb2685d12f361e3903b79bce3583b36fc (patch)
tree4e03d6685e1a44c52dfdaba030a479b324a9722c /src/engine/expressive_engine.rs
parent041cd03fac39dd231d62c79f19a22a5336c49f87 (diff)
Added handling of tesla towers
Diffstat (limited to 'src/engine/expressive_engine.rs')
-rw-r--r--src/engine/expressive_engine.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/expressive_engine.rs b/src/engine/expressive_engine.rs
index b7d7bf2..cc4dae4 100644
--- a/src/engine/expressive_engine.rs
+++ b/src/engine/expressive_engine.rs
@@ -144,8 +144,8 @@ impl ExpressiveGameState {
debug_assert!(p.x < size.x && p.y < size.y);
debug_assert!(player.energy >= blueprint.price);
debug_assert!(b != BuildingType::Tesla ||
- unconstructed_buildings.iter().filter(|b| b.weapon_damage == 20).count() +
- buildings.iter().filter(|b| b.weapon_damage == 20).count() < 2);
+ (unconstructed_buildings.iter().filter(|b| b.weapon_damage == 20).count() +
+ buildings.iter().filter(|b| b.weapon_damage == 20).count() < 2));
player.energy -= blueprint.price;
unconstructed_buildings.push(UnconstructedBuilding::new(p, blueprint));