Releases: chesskit-app/chesskit-swift
Releases · chesskit-app/chesskit-swift
ChessKit 0.5.0
Improvements
- PGN parsing now supports tag pairs (for example
[Event "Name"]
) located at the top of the PGN format, see Issue #8.
Bug Fixes
- Fix issue where king is allowed to castle in check, see Issue #11.
Breaking Changes
- Remove
color
parameter fromMove.init(san:color:position:)
initializer.- It was not being used, can be removed from any initializer call where it was included.
- The new initializer is simply
Move.init(san:position:)
.
Full Changelog: 0.4.0...0.5.0
ChessKit 0.4.0
Improvements
Board
move calculation and validation performance has greatly increased.- Performance has improved by over 250x when simulating a full game using
Board
. - Underlying board representation has been replaced with much faster bitboard structures and algorithms.
- Performance has improved by over 250x when simulating a full game using
- Add
CustomStringConvertible
conformance toBoard
andPosition
to allow for printing chess board representations, useful for debugging. - Add
ChessKitConfiguration
with static configuration properties for the package.- Currently the only option is
printMode
to determine how pieces should be represented when printingBoard
andPosition
objects (see previous item).
- Currently the only option is
Breaking Changes
EnPassant
has been made aninternal struct
. It is used interally byPosition
andBoard
.
Deprecations
Position.toggleSideToMove()
is now private and handled automatically when callingmove()
. The public-facingtoggleSideToMove()
has been deprecated.
Full Changelog: 0.3.2...0.4.0
ChessKit 0.3.2
ChessKit 0.3.1
Improvements
- Added
CaseIterable
conformance to severalPiece
andSquare
enums:Piece.Color
Piece.Kind
Square.Color
Full Changelog: 0.3.0...0.3.1
ChessKit 0.3.0
New Features
- Add
future(for:)
andfullVariation(for:)
methods toMoveTree
.future(for:)
returns the future moves for a given index.fullVariation(for:)
returns the sum ofhistory(for:)
andfuture(for:)
.
Improvements
- Simplify
PGNElement
to just contain a single.move
case.- i.e.
.whiteMove
andblackMove
have been removed and consolidated.
- i.e.
Fixes
- Fix behavior of
previousIndex(for:)
andnextIndex(for:)
inMoveTree
.- Especially when the provided
index
is equal to.minimum
.
- Especially when the provided
Full Changelog: 0.2.0...0.3.0
ChessKit 0.2.0
Added
-
MoveTree
andMoveTree.Index
objects to track move turns and variations.Game.moves
is now aMoveTree
object instead of[Int: MovePair]
MoveTree.Index
includes piece color and variation so it can be used to directly identify any single move within a game- Use the properties and functions of
MoveTree
to retrieve moves within the tree as needed
-
make(move:index:)
andmake(moves:index:)
with ability to make moves onGame
with SAN strings for convenience- For example:
game.make(moves: ["e4", "e5"])
- For example:
-
PGNParser.convert(game:)
now returns the PGN string for a given game, including variations.- Note:
PGNParser.parse(pgn:)
still does not work with variations, this is coming in a future update.
- Note:
-
Game.positions
is now public- Contains a dictionary of all positions in the game by
MoveTree.Index
, including variations
- Contains a dictionary of all positions in the game by
Removed
Game.annotateMove
- Modify
Move.assessment
andMove.comment
directly instead
- Modify
MovePair
- Use
Move
in conjuction withMoveTree.Index
to track move indicies
- Use
color
parameter fromSANParser.parse()
- The color is now obtained from the
sideToMove
in the providedposition
- The color is now obtained from the
Full Changelog: 0.1.2...0.2.0
ChessKit 0.1.2
- Add documentation for all public members
- Add default starting position for
Game
initializer - Add ability to annotate moves via
Game
Full Changelog: 0.1.1...0.1.2
ChessKit 0.1.1
- Downgrade required Swift version to 5.7
- Allows use with Xcode 14.2 on GitHub Actions
Full Changelog: 0.1.0...0.1.1
ChessKit 0.1.0
Initial public release.
Main Features
- Represent a chess board, pieces, etc in Swift code
- Parse chess notation such as PGN, FEN, SAN, etc.
Full Changelog: https://github.com/chesskit-app/chesskit-swift/commits/0.1.0