From 369870509cf17f8bb7dcb73c497b7fb263685cfb Mon Sep 17 00:00:00 2001 From: Micha White Date: Thu, 21 Dec 2023 17:27:59 -0500 Subject: Added some small extra functionality to the engine --- model/src/moves.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'model/src/moves.rs') diff --git a/model/src/moves.rs b/model/src/moves.rs index f6b1fce..720ded6 100644 --- a/model/src/moves.rs +++ b/model/src/moves.rs @@ -89,6 +89,9 @@ impl Move { /// This functions results in undefined behavior if: /// * The piece moves in a direction which would move it outside of the board /// * The starting position of this move doesn't contain a piece + /// * The end position already contains a piece + /// * A jump occurs where jumps are not allowed + /// * A move is not a jump even though jumps are available pub const unsafe fn apply_to(self, board: CheckersBitBoard) -> CheckersBitBoard { match self.jump { false => match self.direction { -- cgit v1.2.3