diff options
| author | Mike White <botahamec@outlook.com> | 2021-09-06 08:03:54 -0400 |
|---|---|---|
| committer | Mike White <botahamec@outlook.com> | 2021-09-06 08:03:54 -0400 |
| commit | 21db0e1056d961b83ccf6d7e2feb06eded25174e (patch) | |
| tree | 1e3021ba1a99c171c17dedf1546f591a40ce24f8 /model/src/board.rs | |
| parent | 744050c4b4747ac4645480e2f4a935a027b8350f (diff) | |
Unit tests
Diffstat (limited to 'model/src/board.rs')
| -rw-r--r-- | model/src/board.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/model/src/board.rs b/model/src/board.rs index b67c13c..f95d837 100644 --- a/model/src/board.rs +++ b/model/src/board.rs @@ -137,6 +137,7 @@ impl CheckersBitBoard { /// * `row` - The row. The a file is row 0 /// * `col` - The column. The first rank is column 0 #[must_use] + // TODO test pub fn get_at_row_col(self, row: usize, col: usize) -> Option<Piece> { if row > 32 || col > 32 { None @@ -319,6 +320,7 @@ impl CheckersBitBoard { /// Change whose turn it is, without modifying the board #[must_use] + // TODO test pub const fn flip_turn(self) -> Self { CheckersBitBoard::new(self.pieces, self.color, self.kings, self.turn.flip()) } @@ -525,6 +527,7 @@ impl CheckersBitBoard { /// Moving from the left side of the board results in undefined behavior. /// Moving from the top of the board results in undefined behavior #[must_use] + // TODO test the edge cases of the below if statement pub const unsafe fn jump_piece_forward_left_unchecked(self, value: usize) -> Self { let is_king = self.king_at_unchecked(value); let board = self |
