projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1d9e140
)
Mitigate perpetual check blindness
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sun, 10 Nov 2019 16:05:07 +0000 (17:05 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sun, 10 Nov 2019 16:05:07 +0000 (17:05 +0100)
Improve handling of problematic positions in #49.
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
1eed7d8
..
7e86ba8
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-1915,7
+1915,7
@@
bool Position::has_game_cycle(int ply) const {
int end = captures_to_hand() ? st->pliesFromNull : std::min(st->rule50, st->pliesFromNull);
- if (end < 3 || var->nFoldValue != VALUE_DRAW)
+ if (end < 3 || var->nFoldValue != VALUE_DRAW || var->perpetualCheckIllegal)
return false;
Key originalKey = st->key;