mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Better naming borrowed from Critter
In line with http://chessprogramming.wikispaces.com conventions. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -270,7 +270,7 @@ namespace {
|
||||
if (moveIsCheck && pos.see_sign(m) >= 0)
|
||||
result += CheckExtension[PvNode];
|
||||
|
||||
if (piece_type(pos.piece_on(move_from(m))) == PAWN)
|
||||
if (type_of(pos.piece_on(move_from(m))) == PAWN)
|
||||
{
|
||||
Color c = pos.side_to_move();
|
||||
if (relative_rank(c, move_to(m)) == RANK_7)
|
||||
@@ -286,7 +286,7 @@ namespace {
|
||||
}
|
||||
|
||||
if ( captureOrPromotion
|
||||
&& piece_type(pos.piece_on(move_to(m))) != PAWN
|
||||
&& type_of(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))
|
||||
@@ -1493,7 +1493,7 @@ split_point_start: // At split points actual search starts from here
|
||||
|
||||
from = move_from(move);
|
||||
to = move_to(move);
|
||||
them = opposite_color(pos.side_to_move());
|
||||
them = flip(pos.side_to_move());
|
||||
ksq = pos.king_square(them);
|
||||
kingAtt = pos.attacks_from<KING>(ksq);
|
||||
pc = pos.piece_on(from);
|
||||
@@ -1509,7 +1509,7 @@ split_point_start: // At split points actual search starts from here
|
||||
return true;
|
||||
|
||||
// Rule 2. Queen contact check is very dangerous
|
||||
if ( piece_type(pc) == QUEEN
|
||||
if ( type_of(pc) == QUEEN
|
||||
&& bit_is_set(kingAtt, to))
|
||||
return true;
|
||||
|
||||
@@ -1644,7 +1644,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))
|
||||
|| piece_type(pos.piece_on(tfrom)) == KING)
|
||||
|| type_of(pos.piece_on(tfrom)) == KING)
|
||||
&& pos.move_attacks_square(m, tto))
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user