Skip to content

Commit

Permalink
Prepare for 0.13.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
pdil committed Oct 3, 2024
1 parent d90add7 commit b90faac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
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

0 comments on commit b90faac

Please sign in to comment.