stellar

UCI Chess engine written in C++20
git clone git://git.dimitrijedobrota.com/stellar.git
Log | Files | Refs | README | LICENSE

bitboard.cpp (565B)


0 #include "bitboard.hpp"
1 #include "bit.hpp"
3 #include <iostream>
5 namespace bitboard {
6 void print(U64 bitboard) {
7 for (int rank = 0; rank < 8; rank++) {
8 for (int file = 0; file < 8; file++) {
9 uint8_t square = (7 - rank) * 8 + file;
10 if (!file) printf(" %d ", 8 - rank);
11 std::cout << bit::get(bitboard, square) << " ";
12 }
13 std::cout << "\n";
14 }
16 std::cout << "\n A B C D E F G H\n\n";
17 std::cout << " Bitboard: " << std::hex << bitboard << std::dec << std::endl;
18 }
19 } // namespace bitboard