diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-01-19 00:01:24 +0100 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-01-19 00:01:24 +0100 |
commit | 0553aebec3bb56f17087573322f078179f090d95 (patch) | |
tree | 59f5d12436e46c3b72a83f96cd2fe8fb13ecd7fc /src | |
parent | a5561e95ed4e436d3d7ec097f00f0481c4364564 (diff) | |
download | chessnost-0553aebec3bb56f17087573322f078179f090d95.tar.gz |
fix: 2 repetitions is enough for 3fold
Diffstat (limited to 'src')
-rw-r--r-- | src/board/mod.rs | 2 |
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 { |