storing castling rights in 8 bits instead of 32

This commit is contained in:
rektdie committed 2024-05-16 01:35:16 +02:00
1 parent d3a26b29df
commit 4c217fa478
4 files changed
+26 -32

No files matched your search

+8 -1
View File
@@ -20,6 +20,13 @@ enum PIECE {
King
};
enum CASTLING_RIGHTS {
whiteKingRight = 1,
whiteQueenRight = 2,
blackKingRight = 4,
blackQueenRight = 8
};
constexpr std::array<const char, 12> PIECE_LETTERS = {
'P', 'p',
'N', 'n',
@@ -87,4 +94,4 @@ enum DIRECTION {
noEa = north + east,
soWe = south + west,
soEa = south + east
};
};