fixed illegal castling
This commit is contained in:
1 parent
2943fccce6
commit
b9792e56da
5 files changed
+52
-6
No files matched your search
@@ -14,6 +14,7 @@ void Board::Reset() {
|
||||
|
||||
pieces = std::array<Bitboard, 6>();
|
||||
colors = std::array<Bitboard, 2>();
|
||||
threatMaps = std::array<std::array<U64, 64>, 2>();
|
||||
|
||||
moveList = std::array<Move, 218>();
|
||||
|
||||
@@ -128,6 +129,14 @@ void Board::ResetMoves() {
|
||||
currentMoveIndex = 0;
|
||||
}
|
||||
|
||||
U64 Board::GetThreatMaps(bool side) {
|
||||
U64 combined = 0ULL;
|
||||
for (int type = Pawn; type <= King; type++) {
|
||||
combined |= threatMaps[side][type];
|
||||
}
|
||||
return combined;
|
||||
}
|
||||
|
||||
void Board::ListMoves() {
|
||||
for (int i = 0; i < currentMoveIndex; i++) {
|
||||
std::cout << i+1 << ". ";
|
||||
|
||||
Reference in new issue
Block a user