mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Small whitespace changes
This commit is contained in:
parent
f4ecc899d8
commit
e45d4f1b65
2 changed files with 28 additions and 26 deletions
|
@ -819,16 +819,18 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
|
|||
}
|
||||
|
||||
// Move the piece. The tricky Chess960 castling is handled earlier
|
||||
if (type_of(m) != CASTLING) {
|
||||
if (Eval::useNNUE)
|
||||
{
|
||||
dp0 = piece_id_on(from);
|
||||
dp.pieceId[0] = dp0;
|
||||
dp.old_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);
|
||||
if (type_of(m) != CASTLING)
|
||||
{
|
||||
if (Eval::useNNUE)
|
||||
{
|
||||
dp0 = piece_id_on(from);
|
||||
dp.pieceId[0] = dp0;
|
||||
dp.old_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);
|
||||
}
|
||||
|
||||
// If the moving piece is a pawn do some special extra work
|
||||
|
|
32
src/types.h
32
src/types.h
|
@ -274,25 +274,25 @@ enum Rank : int {
|
|||
|
||||
// unique number for each piece type on each square
|
||||
enum PieceSquare : uint32_t {
|
||||
PS_NONE = 0,
|
||||
PS_W_PAWN = 1,
|
||||
PS_B_PAWN = 1 * SQUARE_NB + 1,
|
||||
PS_W_KNIGHT = 2 * SQUARE_NB + 1,
|
||||
PS_B_KNIGHT = 3 * SQUARE_NB + 1,
|
||||
PS_W_BISHOP = 4 * SQUARE_NB + 1,
|
||||
PS_B_BISHOP = 5 * SQUARE_NB + 1,
|
||||
PS_W_ROOK = 6 * SQUARE_NB + 1,
|
||||
PS_B_ROOK = 7 * SQUARE_NB + 1,
|
||||
PS_W_QUEEN = 8 * SQUARE_NB + 1,
|
||||
PS_B_QUEEN = 9 * SQUARE_NB + 1,
|
||||
PS_W_KING = 10 * SQUARE_NB + 1,
|
||||
PS_END = PS_W_KING, // pieces without kings (pawns included)
|
||||
PS_B_KING = 11 * SQUARE_NB + 1,
|
||||
PS_END2 = 12 * SQUARE_NB + 1
|
||||
PS_NONE = 0,
|
||||
PS_W_PAWN = 1,
|
||||
PS_B_PAWN = 1 * SQUARE_NB + 1,
|
||||
PS_W_KNIGHT = 2 * SQUARE_NB + 1,
|
||||
PS_B_KNIGHT = 3 * SQUARE_NB + 1,
|
||||
PS_W_BISHOP = 4 * SQUARE_NB + 1,
|
||||
PS_B_BISHOP = 5 * SQUARE_NB + 1,
|
||||
PS_W_ROOK = 6 * SQUARE_NB + 1,
|
||||
PS_B_ROOK = 7 * SQUARE_NB + 1,
|
||||
PS_W_QUEEN = 8 * SQUARE_NB + 1,
|
||||
PS_B_QUEEN = 9 * SQUARE_NB + 1,
|
||||
PS_W_KING = 10 * SQUARE_NB + 1,
|
||||
PS_END = PS_W_KING, // pieces without kings (pawns included)
|
||||
PS_B_KING = 11 * SQUARE_NB + 1,
|
||||
PS_END2 = 12 * SQUARE_NB + 1
|
||||
};
|
||||
|
||||
struct ExtPieceSquare {
|
||||
PieceSquare from[COLOR_NB];
|
||||
PieceSquare from[COLOR_NB];
|
||||
};
|
||||
|
||||
// Array for finding the PieceSquare corresponding to the piece on the board
|
||||
|
|
Loading…
Add table
Reference in a new issue