Improve appearance of board state example in readme

This commit is contained in:
Paolo Di Lorenzo
2025-08-12 22:02:14 -04:00
parent 276d7ace48
commit 27f8fdbd1e
+1 -2
View File
@@ -110,8 +110,6 @@ print(board.legalMoves(forPieceAt: .e2)) // [.e3, .e4]
* Check board state after making a move
``` swift
let board = Board(position: .init("8/5K1k/8/4Q3/8/8/8/8 w - - 0 1")!)
print(board.state) // .active (default)
// 8 · · · · · · · ·
// 7 · · · · · ♔ · ♚
// 6 · · · · · · · ·
@@ -122,6 +120,7 @@ print(board.state) // .active (default)
// 1 · · · · · · · ·
// a b c d e f g h
print(board.state) // .active (default)
board.move(pieceAt: "e5", to: "g7")
print(board.state) // .checkmate(color: .black)
```