A chess board view.
This project is meant to be used for production apps.
- Move pieces (dragging + click)
- Load PGN / Extract PGN
- Navigate through PGN
Add a chess board view programmatically to your view hierarchy
let boardView = ChessBoardView()
view.addSubview(boardView)
Load a PGN onto your chess board
let pgn = "1. e4 e5 2. Nf3 Nc6"
boardView.loadPgn(pgn)
Load or unload moves from the PGN on the chess board
boardView.loadNextMove()
boardView.unloadPreviousMove()
boardView.loadAllMoves()
boardView.unloadAllMoves()
Print the PGN of the chess board using the following code
print(boardView.pgn)
// 1. e4 e5 2. Nf3 Nc6
- Animate PGN
- Animate invalid move because of king in check
- Play sounds (move, capture, castle, check, checkmate, invalid move)