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

View File

@@ -391,7 +391,7 @@ int generate_evasions(const Position &pos, MoveStack *mlist) {
b1 = pos.pawn_attacks(them, checksq) & pos.pawns(us) & ~pinned;
while(b1) {
from = pop_1st_bit(&b1);
if(pawn_rank(us, checksq) == RANK_8) {
if(relative_rank(us, checksq) == RANK_8) {
mlist[n++].move = make_promotion_move(from, checksq, QUEEN);
mlist[n++].move = make_promotion_move(from, checksq, ROOK);
mlist[n++].move = make_promotion_move(from, checksq, BISHOP);