From 29e2dfa19a981cc6a2410dca7d3a961cea388c49 Mon Sep 17 00:00:00 2001 From: Richard Delorme Date: Wed, 17 Aug 2022 10:49:38 +0200 Subject: [PATCH] Remove chess960 guess --- src/board.d | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/board.d b/src/board.d index 2c69255..2aba269 100644 --- a/src/board.d +++ b/src/board.d @@ -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") { @@ -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]);