[board] Implement placing a piece in a mutable position
This commit is contained in:
parent
153e21b693
commit
366f15ca12
2 changed files with 72 additions and 3 deletions
|
@ -19,11 +19,11 @@ impl BitBoard {
|
|||
self.0 == 0
|
||||
}
|
||||
|
||||
fn has_piece_at(&self, sq: &Square) -> bool {
|
||||
pub fn has_piece_at(&self, sq: &Square) -> bool {
|
||||
(self.0 & (1 << sq.index)) > 0
|
||||
}
|
||||
|
||||
fn place_piece_at(&mut self, sq: &Square) {
|
||||
pub fn place_piece_at(&mut self, sq: &Square) {
|
||||
self.0 |= 1 << sq.index
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue