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:
Marco Costalba
2011-10-02 08:33:40 +01:00
parent 25b4d0c127
commit c2c185423b
16 changed files with 213 additions and 214 deletions

View File

@@ -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;