Implemented tesla count for bitwise
authorJustin Worthe <justin@worthe-it.co.za>
Sun, 1 Jul 2018 10:06:21 +0000 (12:06 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Sun, 1 Jul 2018 10:06:21 +0000 (12:06 +0200)
src/engine/bitwise_engine.rs

index 79d5120..ca9cf00 100644 (file)
@@ -67,7 +67,6 @@ impl GameState for BitwiseGameState {
 
 impl PlayerBuildings {
     pub fn count_teslas(&self) -> usize {
-        //TODO
-        2
+        self.tesla_cooldowns.iter().filter(|t| t.active).count()
     }
 }