st->key ^= Zobrist::psq[pc][s];
if (type_of(pc) != KING && type_of(pc) != PAWN)
- st->nonPawnMaterial[color_of(pc)] += PieceValue[MG][pc];
+ st->nonPawnMaterial[color_of(pc)] += PieceValue[pc];
}
if (st->epSquare != SQ_NONE)
}
}
else
- st->nonPawnMaterial[them] -= PieceValue[MG][captured];
+ st->nonPawnMaterial[them] -= PieceValue[captured];
dp.dirty_num = 2; // 1 piece moved, 1 piece captured
dp.piece[1] = captured;
^ Zobrist::psq[pc][pieceCount[pc]];
// Update material
- st->nonPawnMaterial[us] += PieceValue[MG][promotion];
+ st->nonPawnMaterial[us] += PieceValue[promotion];
}
// Reset rule 50 draw counter
Square from = from_sq(m), to = to_sq(m);
- int swap = PieceValue[MG][piece_on(to)] - threshold;
+ int swap = PieceValue[piece_on(to)] - threshold;
if (swap < 0)
return false;
- swap = PieceValue[MG][piece_on(from)] - swap;
+ swap = PieceValue[piece_on(from)] - swap;
if (swap <= 0)
return true;
if ((bb = stmAttackers & pieces(PAWN)))
{
occupied ^= least_significant_square_bb(bb);
- if ((swap = PawnValueMg - swap) < res)
+ if ((swap = PawnValue - swap) < res)
break;
attackers |= attacks_bb<BISHOP>(to, occupied) & pieces(BISHOP, QUEEN);
else if ((bb = stmAttackers & pieces(KNIGHT)))
{
occupied ^= least_significant_square_bb(bb);
- if ((swap = KnightValueMg - swap) < res)
+ if ((swap = KnightValue - swap) < res)
break;
}
else if ((bb = stmAttackers & pieces(BISHOP)))
{
occupied ^= least_significant_square_bb(bb);
- if ((swap = BishopValueMg - swap) < res)
+ if ((swap = BishopValue - swap) < res)
break;
attackers |= attacks_bb<BISHOP>(to, occupied) & pieces(BISHOP, QUEEN);
else if ((bb = stmAttackers & pieces(ROOK)))
{
occupied ^= least_significant_square_bb(bb);
- if ((swap = RookValueMg - swap) < res)
+ if ((swap = RookValue - swap) < res)
break;
attackers |= attacks_bb<ROOK>(to, occupied) & pieces(ROOK, QUEEN);
else if ((bb = stmAttackers & pieces(QUEEN)))
{
occupied ^= least_significant_square_bb(bb);
- if ((swap = QueenValueMg - swap) < res)
+ if ((swap = QueenValue - swap) < res)
break;
attackers |= (attacks_bb<BISHOP>(to, occupied) & pieces(BISHOP, QUEEN))