X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=d99d5e12ec188dd2d3f5cb5f24f86f8984c96939;hb=93059830181b7167525ef4adad7d4ca3115b0701;hp=81f96ccdc74162d7ac63e1b37eece83b23ad9a60;hpb=351ef5c85b6d4b9c71e9da367f0be5ab6e6f8117;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 81f96ccd..d99d5e12 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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 (piece_type(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 + && piece_type(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)) @@ -1530,7 +1530,7 @@ split_point_start: // At split points actual search starts from here return true; // Rule 2. Queen contact check is very dangerous - if ( type_of_piece(pc) == QUEEN + if ( piece_type(pc) == QUEEN && bit_is_set(kingAtt, to)) return true; @@ -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) + || piece_type(pos.piece_on(tfrom)) == KING) && pos.move_attacks_square(m, tto)) return true;