Board(Grid) -> FEN
This commit is contained in:
@@ -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()
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user