summaryrefslogtreecommitdiff
path: root/src/engine/geometry.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-08-31 22:23:02 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-08-31 22:23:02 +0200
commit6f2f6ce1e5d53a2344a26862eb05e4e12bfabe1a (patch)
treeba21e33fa137c987a8489e30bbadba38d0b157bf /src/engine/geometry.rs
parent82230e9f67dbebb3a0a608a53bca05aa38a5f501 (diff)
Most of the heuristic random move lookup structure
Diffstat (limited to 'src/engine/geometry.rs')
-rw-r--r--src/engine/geometry.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/geometry.rs b/src/engine/geometry.rs
index 090652f..b9b556a 100644
--- a/src/engine/geometry.rs
+++ b/src/engine/geometry.rs
@@ -17,6 +17,12 @@ impl Point {
}
}
+ pub fn new_index(index: u8) -> Point {
+ Point {
+ index
+ }
+ }
+
pub fn new_double_bitfield(x: u8, y: u8, is_left_player: bool) -> (u64, u64) {
let bitfield = Point::new(x, y).to_either_bitfield();
if (x >= SINGLE_MAP_WIDTH) == is_left_player {