Skip to content

Commit

Permalink
this looks promising (plotting generalizations >:))
Browse files Browse the repository at this point in the history
  • Loading branch information
raklaptudirm committed Sep 1, 2024
1 parent 2189c42 commit 5f23523
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions games/src/ataxx/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,7 @@ impl PositionType for Position {

/// at returns the Piece of the piece present on the given Square.
fn at(&self, sq: Square) -> Option<ColoredPiece> {
if self.colored_piece_bb(ColoredPiece::Block).contains(sq) {
Some(ColoredPiece::Block)
} else if self.colored_piece_bb(ColoredPiece::Black).contains(sq) {
Some(ColoredPiece::Black)
} else if self.colored_piece_bb(ColoredPiece::White).contains(sq) {
Some(ColoredPiece::White)
} else {
None
}
ColoredPiece::iter().find(|piece| self.colored_piece_bb(*piece).contains(sq))
}

fn piece_bb(&self, piece: Piece) -> BitBoard {
Expand Down

0 comments on commit 5f23523

Please sign in to comment.