projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
6ab8b9b
)
Change condition to use relative rank
author
homoSapiensSapiens
<reuvenpe2005@gmail.com>
Mon, 9 Sep 2013 19:12:15 +0000 (22:12 +0300)
committer
Marco Costalba
<mcostalba@gmail.com>
Mon, 9 Sep 2013 22:47:31 +0000 (
00:47
+0200)
No functional change
src/evaluate.cpp
patch
|
blob
|
history
diff --git
a/src/evaluate.cpp
b/src/evaluate.cpp
index
340a342
..
c7fec91
100644
(file)
--- a/
src/evaluate.cpp
+++ b/
src/evaluate.cpp
@@
-818,7
+818,7
@@
Value do_evaluate(const Position& pos, Value& margin) {
ebonus -= Value(square_distance(pos.king_square(Us), blockSq) * 2 * rr);
// If blockSq is not the queening square then consider also a second push
- if (rank_of(blockSq) != (Us == WHITE ? RANK_8 : RANK_1))
+ if (relative_rank(Us, blockSq) != RANK_8)
ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr);
// If the pawn is free to advance, increase bonus