We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8099b39 commit 29e2dfaCopy full SHA for 29e2dfa
1 file changed
src/board.d
@@ -426,6 +426,7 @@ final class Board {
426
xKing[0] = xKing[1] = Square.none;
427
player = Color.white;
428
ply = 0;
429
+ chess960 = false;
430
}
431
432
void set(string fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1") {
@@ -473,9 +474,6 @@ final class Board {
473
474
foreach (c; s[2]) stack[ply].castling |= toCastling(c);
475
stack[ply].castling &= piece[Piece.rook];
476
- chess960 = ((stack[ply].castling & 0x7EFFFFFFFFFFFF7EUL) != 0);
477
- chess960 |= ((stack[ply].castling & 0x8100000000000000UL) && xKing[Color.black] != Square.e8);
478
- chess960 |= ((stack[ply].castling & 0x0000000000000081UL) && xKing[Color.white] != Square.e1);
479
480
if (s[3] != "-") {
481
stack[ply].enpassant = toSquare(s[3]);
0 commit comments