diff --git a/src/repr/bitboard.rs b/src/repr/bitboard.rs index 3e9a359..0358e29 100644 --- a/src/repr/bitboard.rs +++ b/src/repr/bitboard.rs @@ -90,23 +90,14 @@ impl BitBoard { Self(mask) } - // Check if a BitBoard contains a coordinate - pub const fn contains(&self, coord: CoordPair) -> bool { - (self.0 & (1 << coord.0)) != 0 - } - // Create a BitBoard from a single coordinate pub const fn from_coord(coord: CoordPair) -> Self { Self(1 << coord.0) } - pub fn intersects(self, other: Self) -> bool { + pub const fn intersects(self, other: Self) -> bool { (self.0 & other.0) > 0 } - - pub fn union(self, other: Self) -> Self { - self | other - } } impl std::ops::Not for BitBoard {