projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ee5ac30
)
Fix #3: Filter out double steps when disabled
author
ianfab
<ianfab@users.noreply.github.com>
Thu, 5 Jul 2018 19:29:40 +0000 (21:29 +0200)
committer
ianfab
<ianfab@users.noreply.github.com>
Thu, 5 Jul 2018 19:29:40 +0000 (21:29 +0200)
Fixes pseudo-legal move validation for variants without double steps.
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
f39afa0
..
2fe4232
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-736,7
+736,8
@@
bool Position::pseudo_legal(const Move m) const {
&& !( (from + 2 * pawn_push(us) == to) // Not a double push
&& (rank_of(from) == relative_rank(us, RANK_2))
&& empty(to)
- && empty(to - pawn_push(us))))
+ && empty(to - pawn_push(us))
+ && double_step_enabled()))
return false;
}
else if (!(attacks_from(us, type_of(pc), from) & to))