mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Rename type_of_piece() and color_of_piece()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user