Closed Disservin closed 2 months ago
API:
using PackedBoard = std::array<std::uint8_t, 24>;
normal
Board board = Board("4k1n1/pppppppp/8/8/8/8/PPPPPPPP/4K3 b - - 0 1"); auto compressed = Board::Compact::encode(board); auto newboard = Board::Compact::decode(compressed);
chess960
Board board = Board("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w AHah - 0 1", true); auto compressed = Board::Compact::encode(board); auto newboard = Board::Compact::decode(compressed, true);
API:
normal
chess960