aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2024-01-19 00:01:24 +0100
committereug-vs <eugene@eug-vs.xyz>2024-01-19 00:01:24 +0100
commit0553aebec3bb56f17087573322f078179f090d95 (patch)
tree59f5d12436e46c3b72a83f96cd2fe8fb13ecd7fc /src
parenta5561e95ed4e436d3d7ec097f00f0481c4364564 (diff)
downloadchessnost-0553aebec3bb56f17087573322f078179f090d95.tar.gz
fix: 2 repetitions is enough for 3fold
Diffstat (limited to 'src')
-rw-r--r--src/board/mod.rs2
1 files changed, 1 insertions, 1 deletions
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 {