From 5ac58d201c5cab7be3c5f50b3df22d10435421ec Mon Sep 17 00:00:00 2001 From: Bruno Dutra Date: Wed, 13 Nov 2024 00:49:50 +0100 Subject: [PATCH] slightly tune down the line of sight of threefold repetitions --- lib/chess/position.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/chess/position.rs b/lib/chess/position.rs index d563c488..91977796 100644 --- a/lib/chess/position.rs +++ b/lib/chess/position.rs @@ -168,7 +168,7 @@ pub struct Position { zobrist: Zobrist, checkers: Bitboard, pinned: Bitboard, - history: [[Option; 48]; 2], + history: [[Option; 32]; 2], } impl Default for Position { @@ -180,7 +180,7 @@ impl Default for Position { zobrist: board.zobrist(), checkers: Default::default(), pinned: Default::default(), - history: [[None; 48]; 2], + history: Default::default(), board, } } @@ -499,7 +499,7 @@ impl Position { if role == Pawn || capture.is_some() { self.board.halfmoves = 0; - self.history = [[None; 48]; 2]; + self.history = Default::default(); } else { self.board.halfmoves += 1; let entries = self.history[turn as usize].len(); @@ -669,7 +669,7 @@ impl FromStr for Position { checkers, pinned, zobrist: board.zobrist(), - history: [[None; 48]; 2], + history: Default::default(), board, }) }