[bitboard] Use TrailingBitScanner in occupied_squares_trailing
This was an oversight.
This commit is contained in:
parent
deea23352b
commit
ca861df9c4
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
use crate::library;
|
||||
use crate::LeadingBitScanner;
|
||||
use crate::{LeadingBitScanner, TrailingBitScanner};
|
||||
use chessfriend_core::{Color, Direction, Square};
|
||||
use std::fmt;
|
||||
use std::ops::Not;
|
||||
|
@ -119,7 +119,7 @@ impl BitBoard {
|
|||
/// Return an Iterator over the occupied squares, starting from the trailing
|
||||
/// (least-significant bit) end of the field.
|
||||
pub fn occupied_squares_trailing(&self) -> impl Iterator<Item = Square> {
|
||||
LeadingBitScanner::new(self.0).map(|idx| unsafe { Square::from_index(idx as u8) })
|
||||
TrailingBitScanner::new(self.0).map(|idx| unsafe { Square::from_index(idx as u8) })
|
||||
}
|
||||
|
||||
pub fn first_occupied_square(&self) -> Option<Square> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue