summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-09-05 20:57:10 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-09-05 20:57:10 +0200
commitb249c261380323f429883e2364fed0060b2ffd54 (patch)
tree6956f3b4867357b9a0e4734f38bd9959a1a9b230 /src/engine
parente7e948d8861661880d2d283954288d9dba25014f (diff)
Added weighting of victory / defeat board positions
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/bitwise_engine.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/bitwise_engine.rs b/src/engine/bitwise_engine.rs
index b9f08e3..f03f1c0 100644
--- a/src/engine/bitwise_engine.rs
+++ b/src/engine/bitwise_engine.rs
@@ -476,4 +476,8 @@ impl Player {
let mask = ROW_MASKS[y as usize];
(self.occupied & mask).count_ones() as u16
}
+
+ pub fn count_towers(&self) -> u32 {
+ self.occupied.count_ones()
+ }
}