summaryrefslogtreecommitdiff
path: root/model/src
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-12-21 20:29:30 -0500
committerMicha White <botahamec@outlook.com>2023-12-21 20:29:30 -0500
commit76552c16b79f9c73ed2afd74ee0e17f175477a6a (patch)
treea9c0c4579abcb5e8f34e6307962662a8ba456bff /model/src
parent2143281a1f84040dbcd7a43b62772f9827042136 (diff)
Add docs
Diffstat (limited to 'model/src')
-rw-r--r--model/src/moves.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/model/src/moves.rs b/model/src/moves.rs
index c28bcef..525a35c 100644
--- a/model/src/moves.rs
+++ b/model/src/moves.rs
@@ -10,6 +10,13 @@ pub enum MoveDirection {
}
/// A checkers move
+// This is stored as a single byte. The first five bits represent the starting
+// position, the next two bits represent the direction, and the last bit
+// represents whether or not the move is a jump.
+//
+// starting position direction jump
+// |--------------------|--------|----|
+// 5 2 1
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub struct Move(u8);