Board(Grid) -> FEN

This commit is contained in:
cdricms
2024-06-28 18:30:28 +02:00
parent c79e80680c
commit 501484558a
4 changed files with 64 additions and 5 deletions

View File

@@ -105,6 +105,16 @@ final class EngineTests: XCTestCase {
XCTAssertEqual(result, pb.pseudoLegalPositions)
}
func testSetFenFromBoard() throws {
let board: Board = .init()
let fen = board.fen.value
board.fen.set(
from: board.board, castiling: board.fen.castlingAvailibility,
enPassant: board.fen.enPassant)
XCTAssertEqual(
fen, board.fen.value, "Expected \(fen) got \(board.fen.value)")
}
// func testBoard() throws {
// let board = Board()
// }