from = move_from(m);
to = move_to(m);
- assert(pawn_rank(us, to) == RANK_8);
+ assert(relative_rank(us, to) == RANK_8);
assert(this->piece_on(from) == pawn_of_color(us));
assert(this->color_of_piece_on(to) == them || this->square_is_empty(to));
capsq = (us == WHITE)? (to - DELTA_N) : (to - DELTA_S);
assert(to == epSquare);
- assert(pawn_rank(us, to) == RANK_6);
+ assert(relative_rank(us, to) == RANK_6);
assert(this->piece_on(to) == EMPTY);
assert(this->piece_on(from) == pawn_of_color(us));
assert(this->piece_on(capsq) == pawn_of_color(them));
from = move_from(m);
to = move_to(m);
- assert(pawn_rank(us, to) == RANK_8);
+ assert(relative_rank(us, to) == RANK_8);
assert(this->piece_on(from) == EMPTY);
// Remove promoted piece:
capsq = (us == WHITE)? (to - DELTA_N) : (to - DELTA_S);
assert(to == this->ep_square());
- assert(pawn_rank(us, to) == RANK_6);
+ assert(relative_rank(us, to) == RANK_6);
assert(this->piece_on(to) == pawn_of_color(us));
assert(this->piece_on(from) == EMPTY);
assert(this->piece_on(capsq) == EMPTY);
if(this->ep_square() != SQ_NONE) {
// The en passant square must be on rank 6, from the point of view of the
// side to move.
- if(pawn_rank(this->side_to_move(), this->ep_square()) != RANK_6)
+ if(relative_rank(this->side_to_move(), this->ep_square()) != RANK_6)
return false;
}