1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Small whitespace changes

This commit is contained in:
Joost VandeVondele 2020-08-02 16:30:00 +02:00
parent f4ecc899d8
commit e45d4f1b65
2 changed files with 28 additions and 26 deletions

View file

@ -819,16 +819,18 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
} }
// Move the piece. The tricky Chess960 castling is handled earlier // Move the piece. The tricky Chess960 castling is handled earlier
if (type_of(m) != CASTLING) { if (type_of(m) != CASTLING)
if (Eval::useNNUE) {
{ if (Eval::useNNUE)
dp0 = piece_id_on(from); {
dp.pieceId[0] = dp0; dp0 = piece_id_on(from);
dp.old_piece[0] = evalList.piece_with_id(dp0); dp.pieceId[0] = dp0;
evalList.put_piece(dp0, to, pc); dp.old_piece[0] = evalList.piece_with_id(dp0);
dp.new_piece[0] = evalList.piece_with_id(dp0); evalList.put_piece(dp0, to, pc);
} dp.new_piece[0] = evalList.piece_with_id(dp0);
move_piece(from, to); }
move_piece(from, to);
} }
// If the moving piece is a pawn do some special extra work // If the moving piece is a pawn do some special extra work

View file

@ -274,25 +274,25 @@ enum Rank : int {
// unique number for each piece type on each square // unique number for each piece type on each square
enum PieceSquare : uint32_t { enum PieceSquare : uint32_t {
PS_NONE = 0, PS_NONE = 0,
PS_W_PAWN = 1, PS_W_PAWN = 1,
PS_B_PAWN = 1 * SQUARE_NB + 1, PS_B_PAWN = 1 * SQUARE_NB + 1,
PS_W_KNIGHT = 2 * SQUARE_NB + 1, PS_W_KNIGHT = 2 * SQUARE_NB + 1,
PS_B_KNIGHT = 3 * SQUARE_NB + 1, PS_B_KNIGHT = 3 * SQUARE_NB + 1,
PS_W_BISHOP = 4 * SQUARE_NB + 1, PS_W_BISHOP = 4 * SQUARE_NB + 1,
PS_B_BISHOP = 5 * SQUARE_NB + 1, PS_B_BISHOP = 5 * SQUARE_NB + 1,
PS_W_ROOK = 6 * SQUARE_NB + 1, PS_W_ROOK = 6 * SQUARE_NB + 1,
PS_B_ROOK = 7 * SQUARE_NB + 1, PS_B_ROOK = 7 * SQUARE_NB + 1,
PS_W_QUEEN = 8 * SQUARE_NB + 1, PS_W_QUEEN = 8 * SQUARE_NB + 1,
PS_B_QUEEN = 9 * SQUARE_NB + 1, PS_B_QUEEN = 9 * SQUARE_NB + 1,
PS_W_KING = 10 * SQUARE_NB + 1, PS_W_KING = 10 * SQUARE_NB + 1,
PS_END = PS_W_KING, // pieces without kings (pawns included) PS_END = PS_W_KING, // pieces without kings (pawns included)
PS_B_KING = 11 * SQUARE_NB + 1, PS_B_KING = 11 * SQUARE_NB + 1,
PS_END2 = 12 * SQUARE_NB + 1 PS_END2 = 12 * SQUARE_NB + 1
}; };
struct ExtPieceSquare { struct ExtPieceSquare {
PieceSquare from[COLOR_NB]; PieceSquare from[COLOR_NB];
}; };
// Array for finding the PieceSquare corresponding to the piece on the board // Array for finding the PieceSquare corresponding to the piece on the board