Skip to content

Commit

Permalink
Remove chess960 guess
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Delorme committed Aug 17, 2022
1 parent 8099b39 commit 29e2dfa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/board.d
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ final class Board {
xKing[0] = xKing[1] = Square.none;
player = Color.white;
ply = 0;
chess960 = false;
}

void set(string fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1") {
Expand Down Expand Up @@ -473,9 +474,6 @@ final class Board {
foreach (c; s[2]) stack[ply].castling |= toCastling(c);
stack[ply].castling &= piece[Piece.rook];
}
chess960 = ((stack[ply].castling & 0x7EFFFFFFFFFFFF7EUL) != 0);
chess960 |= ((stack[ply].castling & 0x8100000000000000UL) && xKing[Color.black] != Square.e8);
chess960 |= ((stack[ply].castling & 0x0000000000000081UL) && xKing[Color.white] != Square.e1);

if (s[3] != "-") {
stack[ply].enpassant = toSquare(s[3]);
Expand Down

0 comments on commit 29e2dfa

Please sign in to comment.