// Set thinking time:
int myTime = time[side_to_move];
int myIncrement = increment[side_to_move];
- int oppTime = time[1 - side_to_move];
if (!movesToGo) // Sudden death time control
{
else if ( !value_is_mate(beta)
&& approximateEval < beta - RazorMargin
&& depth < RazorDepth
- && (RazorAtDepthOne || depth >= 2*OnePly)
+ && (RazorAtDepthOne || depth > OnePly)
&& ttMove == MOVE_NONE
&& !pos.has_pawn_on_7th(pos.side_to_move()))
{
if (mateThreat)
result += MateThreatExtension[pvNode];
- if (pos.move_is_pawn_push_to_7th(m))
+ if (pos.type_of_piece_on(move_from(m)) == PAWN)
{
- result += PawnPushTo7thExtension[pvNode];
- *dangerous = true;
- }
- if (pos.move_is_passed_pawn_push(m))
- {
- result += PassedPawnExtension[pvNode];
- *dangerous = true;
+ if (pos.move_is_pawn_push_to_7th(m))
+ {
+ result += PawnPushTo7thExtension[pvNode];
+ *dangerous = true;
+ }
+ if (pos.move_is_passed_pawn_push(m))
+ {
+ result += PassedPawnExtension[pvNode];
+ *dangerous = true;
+ }
}
if ( pos.move_is_capture(m)