mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Retire Position::type_of_piece_on()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -300,7 +300,7 @@ namespace {
|
||||
if (moveIsCheck && pos.see_sign(m) >= 0)
|
||||
result += CheckExtension[PvNode];
|
||||
|
||||
if (pos.type_of_piece_on(move_from(m)) == PAWN)
|
||||
if (type_of_piece(pos.piece_on(move_from(m))) == PAWN)
|
||||
{
|
||||
Color c = pos.side_to_move();
|
||||
if (relative_rank(c, move_to(m)) == RANK_7)
|
||||
@@ -316,7 +316,7 @@ namespace {
|
||||
}
|
||||
|
||||
if ( captureOrPromotion
|
||||
&& pos.type_of_piece_on(move_to(m)) != PAWN
|
||||
&& type_of_piece(pos.piece_on(move_to(m))) != PAWN
|
||||
&& ( pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
|
||||
- piece_value_midgame(pos.piece_on(move_to(m))) == VALUE_ZERO)
|
||||
&& !move_is_special(m))
|
||||
@@ -1666,7 +1666,7 @@ split_point_start: // At split points actual search starts from here
|
||||
// value of the threatening piece, don't prune moves which defend it.
|
||||
if ( pos.move_is_capture(threat)
|
||||
&& ( piece_value_midgame(pos.piece_on(tfrom)) >= piece_value_midgame(pos.piece_on(tto))
|
||||
|| pos.type_of_piece_on(tfrom) == KING)
|
||||
|| type_of_piece(pos.piece_on(tfrom)) == KING)
|
||||
&& pos.move_attacks_square(m, tto))
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user