Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 0.13.0 #47

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# [unreleased]
# ChessKit 0.13.0
Released Thursday, October 3, 2024.

### New Features
* `BoardDelegate` now notifies when king is in check, and provides the color of the checked king, see [Issue #38](https://github.com/chesskit-app/chesskit-swift/issues/38).
Expand Down
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,24 @@ import ChessKit
## Features

* Representation of chess elements
* `Piece`
* `Square`
* `Move`
* `Position`
* `Board`
* `Clock`
* `Game`
* Special moves (castling, en passant)
* `Piece`: represents a single piece on the board, given by its color, type, and location on the board
* `Square`: represents a square on the board
* `Move`: represents a piece move, along with other metadata such as captures, annotations, and disambiguations
* `Position`: represents a single position on the chess board
* `Board`: validate and make moves in accordance with chess rules
* `Game`: manage positions throughout a game and PGN tags
* Special moves (castling, en passant): handled automatically by `Position` and `Board`
* Move validation
* Implemented using highly performant `UInt64` [bitboards](https://www.chessprogramming.org/Bitboards).
* Implemented using highly performant `UInt64` [bitboards](https://www.chessprogramming.org/Bitboards).
* Move branching and variations
* Implemented using a performant tree-like data structure `MoveTree`.
* Pawn promotion handling
* Game states (check, stalemate, checkmate, etc.)
* Game states (check, stalemate, checkmate, draws)
* Chess notation string parsing
* PGN
* FEN
* SAN
* `PGNParser`
* `FENParser`
* `SANParser`
* `EngineLANParser` (for use with [UCI](https://www.wbec-ridderkerk.nl/html/UCIProtocol.html) engines)

## Examples

Expand Down Expand Up @@ -105,18 +107,15 @@ let board = Board()
print(board.legalMoves(forPieceAt: .e2)) // [.e3, .e4]
```

* Parse [FEN](https://en.wikipedia.org/wiki/Forsyth–Edwards_Notation) into a `Position` object
* Parse [FEN](https://en.wikipedia.org/wiki/Forsyth–Edwards_Notation) into a `Position` object, [PGN](https://en.wikipedia.org/wiki/Portable_Game_Notation) (into `Game`), or [SAN](https://en.wikipedia.org/wiki/Algebraic_notation_(chess)) (into `Move`).
``` swift
// parse FEN using Position initializer
let fen = "rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2"
let position = Position(fen: fen)

// convert Position to FEN string
let fenString = position.fen
```

* Similarly, parse [PGN](https://en.wikipedia.org/wiki/Portable_Game_Notation) (into `Game`) or [SAN](https://en.wikipedia.org/wiki/Algebraic_notation_(chess)) (into `Move`).
``` swift
// parse PGN using Game initializer
let game = Game(pgn: "1. e4 e5 2. Nf3")

Expand Down
Loading