From 0553aebec3bb56f17087573322f078179f090d95 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 19 Jan 2024 00:01:24 +0100 Subject: fix: 2 repetitions is enough for 3fold --- src/board/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/board/mod.rs b/src/board/mod.rs index 01a5b03..82a9e7f 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -390,7 +390,7 @@ impl Board { } pub fn threefold_repetition(&self) -> bool { - self.positions.iter().filter(|&&p| p == self.hash).count() >= 3 + self.positions.iter().filter(|&&p| p == self.hash).count() >= 2 } pub fn is_theoretically_winnable(&self, color: Color) -> bool { -- cgit v1.2.3