Rename pawn_rank() in relative_rank()

It is more clear, at last for me.

Also cleanup evaluate_rook() and evaluate_queen()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2008-09-24 16:45:19 +02:00
parent 3263ee8557
commit f56af8e84d
8 changed files with 82 additions and 79 deletions
+2 -2
View File
@@ -81,9 +81,9 @@ Move move_from_string(const Position &pos, const std::string &str) {
SquareDelta delta = (to > from)? DELTA_E : DELTA_W;
Square s;
for(s = from + delta;
pawn_rank(us, s) == RANK_1 && pos.piece_on(s) != rook_of_color(us);
relative_rank(us, s) == RANK_1 && pos.piece_on(s) != rook_of_color(us);
s += delta);
if(pawn_rank(us, s) == RANK_1 && pos.piece_on(s) == rook_of_color(us))
if(relative_rank(us, s) == RANK_1 && pos.piece_on(s) == rook_of_color(us))
return make_castle_move(from, s);
}
}