#include "types.h"
+namespace Bitboards {
+
+extern void init();
+extern void print(Bitboard b);
+
+}
+
CACHE_LINE_ALIGNMENT
extern Bitboard RMasks[64];
return !(b & (b - 1));
}
+
/// first_1() finds the least significant nonzero bit in a nonzero bitboard.
/// pop_1st_bit() finds and clears the least significant nonzero bit in a
/// nonzero bitboard.
#endif
-// relative_rank() returns the relative rank of the closest bit set on the Bitboard.
-// Only to be used with bitboards that contain a single file.
-
-template<Color Us>
-inline Rank relative_rank(Bitboard b) {
- Square s = Us == WHITE ? first_1(b)
- : ~last_1(b);
- return rank_of(s);
-}
-
-extern void print_bitboard(Bitboard b);
-extern void bitboards_init();
-
#endif // !defined(BITBOARD_H_INCLUDED)