diff --git a/src/board/bitboard/iterator.rs b/src/board/bitboard/iterator.rs index fcd644c..06db283 100644 --- a/src/board/bitboard/iterator.rs +++ b/src/board/bitboard/iterator.rs @@ -14,14 +14,4 @@ impl Iterator for BitboardIterator { Some(crate::board::Square::from_index(lsb)) } } - - fn size_hint(&self) -> (usize, Option) { - let size = self.0.count_ones() as usize; - - (size, Some(size)) - } } - -impl ExactSizeIterator for BitboardIterator {} - -impl std::iter::FusedIterator for BitboardIterator {} diff --git a/src/board/color.rs b/src/board/color.rs index d71df67..a7af8b6 100644 --- a/src/board/color.rs +++ b/src/board/color.rs @@ -1,4 +1,4 @@ -use super::{Direction, Rank}; +use super::Rank; /// An enum representing the color of a player. #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -65,21 +65,6 @@ impl Color { Self::Black => Rank::Second, } } - - /// Which way do pawns advance for this color. - #[inline(always)] - pub fn forward_direction(self) -> Direction { - match self { - Self::White => Direction::North, - Self::Black => Direction::South, - } - } - - /// Which way do the opponent's pawns advance for this color. - #[inline(always)] - pub fn backward_direction(self) -> Direction { - (!self).forward_direction() - } } impl std::ops::Not for Color {