[board] Remove a pile of debug printing from pieces.rs
This commit is contained in:
parent
164122a140
commit
301fe1a4f4
1 changed files with 0 additions and 10 deletions
|
@ -32,9 +32,7 @@ impl<'a> Iterator for Pieces<'a> {
|
|||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
if let Some(square_iterator) = &mut self.square_iterator {
|
||||
println!("1 Got square iterator");
|
||||
if let (Some(square), Some(shape)) = (square_iterator.next(), self.current_shape) {
|
||||
println!("1 Got square {:?} and shape {:?}", &square, &shape);
|
||||
return Some(PlacedPiece::new(Piece::new(self.color, shape), square));
|
||||
}
|
||||
}
|
||||
|
@ -47,12 +45,9 @@ impl<'a> Iterator for Pieces<'a> {
|
|||
|
||||
let bitboard = self.position.bitboard_for_piece(piece);
|
||||
if bitboard.is_empty() {
|
||||
println!("No {:?} pieces; looping", &piece);
|
||||
continue;
|
||||
}
|
||||
|
||||
println!("Found some {:?} pieces", &piece);
|
||||
|
||||
next_nonempty_bitboard = Some(bitboard);
|
||||
current_shape = Some(shape);
|
||||
|
||||
|
@ -60,23 +55,18 @@ impl<'a> Iterator for Pieces<'a> {
|
|||
}
|
||||
|
||||
if let (Some(bitboard), Some(shape)) = (next_nonempty_bitboard, current_shape) {
|
||||
println!("Got bitboard and shape {:?}", &shape);
|
||||
|
||||
let piece = Piece::new(self.color, shape);
|
||||
|
||||
let mut square_iterator = bitboard.occupied_squares();
|
||||
println!("Created occupied_squares iterator for {:?}", &piece);
|
||||
|
||||
let mut next_placed_piece: Option<PlacedPiece> = None;
|
||||
if let Some(square) = square_iterator.next() {
|
||||
println!("2 Got {:?} and shape {:?}", &square, &shape);
|
||||
next_placed_piece = Some(PlacedPiece::new(Piece::new(self.color, shape), square));
|
||||
}
|
||||
|
||||
self.square_iterator = Some(Box::new(square_iterator));
|
||||
self.current_shape = Some(shape);
|
||||
|
||||
println!("Next placed piece {:?}", &next_placed_piece);
|
||||
return next_placed_piece;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue