Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
Loading...
Searching...
No Matches
bitboard.h
Go to the documentation of this file.
1#pragma once
2
3#include "../defs.h"
4
5#define POP(b) popLSB(b)
6#define CNT(b) countSetBits(b)
7
11extern const int BitTable[64];
12
19extern int popLSB(U64* bb);
20
27extern int countSetBits(U64 b);
28
36extern void printBitBoard(U64 bb);
void printBitBoard(U64 bb)
Prints a visual representation of a bitboard to stdout.
Definition bitboards.cpp:27
const int BitTable[64]
Lookup table for bit index extraction.
Definition bitboards.cpp:7
int popLSB(U64 *bb)
Pops the least significant 1-bit from a bitboard and returns its index (0–63).
Definition bitboards.cpp:14
int countSetBits(U64 b)
Counts the number of 1-bits in a bitboard.
Definition bitboards.cpp:21
unsigned long long U64
Definition defs.h:26