fixed marlinformat pieces
This commit is contained in:
1 parent
15a8e1c134
commit
d703ea6010
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -10,7 +10,7 @@ constexpr int RAND_MOVES = 8;
|
||||
|
||||
struct MarlinFormat {
|
||||
uint64_t occupancy; // 8 bytes: Bitboard representing all occupied squares (includes all pieces)
|
||||
std::array<uint8_t, 32> pieces; // 32 bytes: 64 squares stored in 4-bit format (2 squares per byte)
|
||||
std::array<uint8_t, 16> pieces; // 16 bytes: 64 squares stored in 4-bit format (2 squares per byte)
|
||||
uint8_t stmEPSquare; // 1 byte: STM (side to move) in bit 7, EP square in bits 0-5
|
||||
uint8_t halfmoveClock; // 1 byte: Halfmove counter for the 50-move rule (incremented after each move)
|
||||
uint16_t fullmoveNumber; // 2 bytes: Full move counter, starting at 1 (increments after Black's move)
|
||||
|
||||
+2
-2
@@ -147,10 +147,10 @@ Move parseMove(Board &board, std::string_view str) {
|
||||
return Move(from, to, flag);
|
||||
}
|
||||
|
||||
std::array<uint8_t, 32> CompressPieces(Board &board) {
|
||||
std::array<uint8_t, 16> CompressPieces(Board &board) {
|
||||
const uint8_t UNMOVED_ROOK = 0x10; // Special value for unmoved rooks
|
||||
|
||||
std::array<uint8_t, 32> compressed;
|
||||
std::array<uint8_t, 16> compressed;
|
||||
|
||||
for (int square = a1; square <= h8; square++) {
|
||||
int pieceCode = 0;
|
||||
|
||||
+1
-1
@@ -30,6 +30,6 @@ int parseSquare(std::string_view str);
|
||||
|
||||
Move parseMove(Board &board, std::string_view str);
|
||||
|
||||
std::array<uint8_t, 32> CompressPieces(Board &board);
|
||||
std::array<uint8_t, 16> CompressPieces(Board &board);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user