projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b08ba44
)
Simplify 50 move rule condition
author
Joona Kiiski
<joona.kiiski@gmail.com>
Thu, 6 Jan 2011 13:21:30 +0000 (15:21 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Thu, 6 Jan 2011 13:46:49 +0000 (14:46 +0100)
We never reach a position where rule50 > 100.
When rule50 == 100, it's either draw or mate and
there is no way search could go deeper.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
ae28805
..
aac03eb
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-1691,7
+1691,7
@@
bool Position::is_draw() const {
return true;
// Draw by the 50 moves rule?
- if (st->rule50 > 99 && (st->rule50 > 100 || !is_mate()))
+ if (st->rule50 > 99 && !is_mate())
return true;
// Draw by repetition?