summaryrefslogtreecommitdiff
path: root/src/engine/mod.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-07-02 22:08:51 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-07-02 22:08:51 +0200
commit8e44d57fdb1c7be69501ebdfc5f9f5d48642b065 (patch)
tree34ffbf39a94283f4d1bdcf77dc439ac2b5f4f763 /src/engine/mod.rs
parent8251d5899a64515c9b2e8a71349dd4d2fcece69e (diff)
Initial drop in replacement implementation
It's faster than the other one! Doesn't tesla yet, but still! Yay!
Diffstat (limited to 'src/engine/mod.rs')
-rw-r--r--src/engine/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/mod.rs b/src/engine/mod.rs
index 39a5f26..d36d0e9 100644
--- a/src/engine/mod.rs
+++ b/src/engine/mod.rs
@@ -15,8 +15,11 @@ pub trait GameState: Clone + Sync {
fn opponent(&self) -> &Player;
fn player_has_max_teslas(&self) -> bool;
fn opponent_has_max_teslas(&self) -> bool;
- fn unoccupied_player_cells(&self) -> &[Point];
- fn unoccupied_opponent_cells(&self) -> &[Point];
+
+ fn unoccupied_player_cell_count(&self) -> usize;
+ fn unoccupied_opponent_cell_count(&self) -> usize;
+ fn location_of_unoccupied_player_cell(&self, i: usize) -> Point;
+ fn location_of_unoccupied_opponent_cell(&self, i: usize) -> Point;
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]