diff --git a/src/board/bitboard/mod.rs b/src/board/bitboard/mod.rs index d2f3723..04b205a 100644 --- a/src/board/bitboard/mod.rs +++ b/src/board/bitboard/mod.rs @@ -49,6 +49,12 @@ impl Bitboard { pub fn count(self) -> u32 { self.0.count_ones() } + + /// Return true if there are no pieces in the [Bitboard], otherwise false. + #[inline(always)] + pub fn is_empty(self) -> bool { + self == Self::EMPTY + } } impl Default for Bitboard {