From 76552c16b79f9c73ed2afd74ee0e17f175477a6a Mon Sep 17 00:00:00 2001 From: Micha White Date: Thu, 21 Dec 2023 20:29:30 -0500 Subject: Add docs --- model/src/moves.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- cgit v1.2.3