This commit is contained in:
2025-03-04 15:43:34 -05:00
parent ee70413bcf
commit ea7df6a739
4 changed files with 30 additions and 53 deletions

View File

@@ -144,22 +144,11 @@ impl Board {
/// Starting position
pub fn starting_pos(mut self) -> Self {
self.place_unchecked(
((Self::BOARD_SIZE / 2) - 1, (Self::BOARD_SIZE / 2) - 1).into(),
Piece::White,
);
self.place_unchecked(
(Self::BOARD_SIZE / 2, (Self::BOARD_SIZE / 2) - 1).into(),
Piece::Black,
);
self.place_unchecked(
((Self::BOARD_SIZE / 2) - 1, Self::BOARD_SIZE / 2).into(),
Piece::Black,
);
self.place_unchecked(
(Self::BOARD_SIZE / 2, Self::BOARD_SIZE / 2).into(),
Piece::White,
);
let hf = Self::BOARD_SIZE / 2;
self.place_unchecked((hf - 1, hf - 1).into(), Piece::White);
self.place_unchecked((hf, hf - 1).into(), Piece::Black);
self.place_unchecked((hf - 1, hf).into(), Piece::Black);
self.place_unchecked((hf, hf).into(), Piece::White);
self
}