From 301fe1a4f461573df8a10e3918055ae4a455f9e1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 29 Dec 2023 09:03:51 -0800 Subject: [PATCH] [board] Remove a pile of debug printing from pieces.rs --- board/src/position/pieces.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/board/src/position/pieces.rs b/board/src/position/pieces.rs index d5965d5..dda9301 100644 --- a/board/src/position/pieces.rs +++ b/board/src/position/pieces.rs @@ -32,9 +32,7 @@ impl<'a> Iterator for Pieces<'a> { fn next(&mut self) -> Option { 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 = 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; }