Rename type_of_piece() and color_of_piece()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-06-26 10:52:42 +01:00
parent 923b14afaa
commit ae2f5f25cd
6 changed files with 40 additions and 40 deletions

View File

@@ -217,7 +217,7 @@ MoveStack* generate<MV_NON_CAPTURE_CHECK>(const Position& pos, MoveStack* mlist)
while (b)
{
from = pop_1st_bit(&b);
switch (type_of_piece(pos.piece_on(from)))
switch (piece_type(pos.piece_on(from)))
{
case PAWN: /* Will be generated togheter with pawns direct checks */ break;
case KNIGHT: mlist = generate_discovered_checks<KNIGHT>(pos, mlist, from); break;
@@ -265,9 +265,9 @@ MoveStack* generate<MV_EVASION>(const Position& pos, MoveStack* mlist) {
checkersCnt++;
checksq = pop_1st_bit(&b);
assert(color_of_piece(pos.piece_on(checksq)) == opposite_color(us));
assert(piece_color(pos.piece_on(checksq)) == opposite_color(us));
switch (type_of_piece(pos.piece_on(checksq)))
switch (piece_type(pos.piece_on(checksq)))
{
case BISHOP: sliderAttacks |= BishopPseudoAttacks[checksq]; break;
case ROOK: sliderAttacks |= RookPseudoAttacks[checksq]; break;