diff options
| author | Micha White <botahamec@outlook.com> | 2023-12-21 17:27:59 -0500 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2023-12-21 17:27:59 -0500 |
| commit | 369870509cf17f8bb7dcb73c497b7fb263685cfb (patch) | |
| tree | e6c4089fee86162a0919d62a2b2307cabfe5d695 /model/src/moves.rs | |
| parent | 207bafde1fa2468d666c7ac894eebee1cf95bed2 (diff) | |
Added some small extra functionality to the engine
Diffstat (limited to 'model/src/moves.rs')
| -rw-r--r-- | model/src/moves.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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 { |
