mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Remove xxx_of_color() helpers
They hide the underlying uniform function call with no benefit. A little bit more verbose but now is clear what happens. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -467,8 +467,8 @@ bool move_is_legal(const Position& pos, const Move m, Bitboard pinned) {
|
||||
illegal = true;
|
||||
|
||||
if ( square_file(to) == FILE_B
|
||||
&& ( pos.piece_on(to + DELTA_W) == rook_of_color(them)
|
||||
|| pos.piece_on(to + DELTA_W) == queen_of_color(them)))
|
||||
&& ( pos.piece_on(to + DELTA_W) == piece_of_color_and_type(them, ROOK)
|
||||
|| pos.piece_on(to + DELTA_W) == piece_of_color_and_type(them, QUEEN)))
|
||||
illegal = true;
|
||||
|
||||
return !illegal;
|
||||
@@ -888,8 +888,8 @@ namespace {
|
||||
|
||||
if ( Side == QUEEN_SIDE
|
||||
&& square_file(rsq) == FILE_B
|
||||
&& ( pos.piece_on(relative_square(us, SQ_A1)) == rook_of_color(them)
|
||||
|| pos.piece_on(relative_square(us, SQ_A1)) == queen_of_color(them)))
|
||||
&& ( pos.piece_on(relative_square(us, SQ_A1)) == piece_of_color_and_type(them, ROOK)
|
||||
|| pos.piece_on(relative_square(us, SQ_A1)) == piece_of_color_and_type(them, QUEEN)))
|
||||
illegal = true;
|
||||
|
||||
if (!illegal)
|
||||
|
||||
Reference in New Issue
Block a user