13 KiB
ChessKit 0.17.0
Released Wednesday, November 12, 2025.
New Features
- All public types except for
Boardnow conform toCodable.Boardconformance toCodablewill be added whenBoardDelegateis removed.
ChessKit 0.16.0
Released Monday, September 15, 2025.
New Features
- Add
Board.stateproperty to track board state changes.BoardDelegateandBoard.delegatehave been deprecated and will be removed in the future.
- Add
Board.update(position:)to updatepositioninBoard.- Updates
statealong withposition. Board.positionnow has a private setter, useBoard.update(position:)instead.
- Updates
- Add support for
½character in PGN parser game result (by @Amir-Zucker).
Bug Fixes
- Fix issue where PGN parser parses game result as a number (by @Amir-Zucker).
- Fix issue where SAN parser did not disambiguate between check and checkmate moves (by @Amir-Zucker).
ChessKit 0.15.0
Released Thursday, June 19, 2025.
New Features
- Command line interface, view and test ChessKit features using
swift run chesskit-cli- See provided usage when running
chesskit-clifor available commands.
- See provided usage when running
Positionnow includes anassessmentproperty for positional assessments.- Possible values for
assessmentare part of the newPosition.Assessmentenum. - These are based on the standardized Numerical Annotation Glyphs (also used for
Move.Assessment). GameandMoveTreehave methods to update positional assessments.
- Possible values for
Improvements
- Rewrote
PGNParserto be more efficient and reliable.- Now parses PGN text more flexibly, accounting nested variations.
PGNParser.parse(game:)has replaced the now deprecatedPGNParser.parse(game:startingWith:)(position is now inferred from the PGN tags).parse(game:)is now a throwing method with a robust bank of possible errors for better error handling and understanding of why the PGN could not be parsed.Game(pgn:)is now also a throwing initializer, passing on the error fromPGNParser.- Now parses
Position.Assessment(see above).
- Add
Move.Assessment(notation:)initializer. - Add
allproperty toGame.Tagsto return array of all named tags. - Add
CustomStringConvertibleconformance toGameandMove.
Bug Fixes
- Fix
SANParsernot parsing en passant captures properly (by Rob Raese). - Fix parsing of
"PlyCount","TimeControl", and"SetUp"PGN tags.
ChessKit 0.14.0
Released Tuesday, June 3, 2025.
New Features
- Add
willPromote()toBoardDelegate(by @Amir-Zucker).- Called when pawn reaches last rank but before
Board.completePromotion()is called.
- Called when pawn reaches last rank but before
Improvements
PGNParsernow parses*game results (indicating game in progress, abandoned, unknown, etc.).- Add
CustomStringConvertibleconformance toPiece,Piece.Color, andPiece.Kind. - Migrate all unit tests (expect performance tests) from
XCTesttoSwift Testing.
Bug Fixes
- Fix issue where
MoveTree.endIndexis not properly updated after the first half move (by @Amir-Zucker). - Fix issue where
BoardDelegate.didPromote()was called before and after promotion (by @Amir-Zucker). - Fix issue where pawns on the starting rank could hop over pieces in front of them, see Issue #49 (by @joee-ca).
- Fix
SANParser(andPGNParser) accepting invalid SANs when they started with a valid SAN (e.g."e44"which starts with the valid"e4").
Breaking Changes
Game(pgn:)is no longer a failable initializer, it will now always create a non-nilGame.
ChessKit 0.13.0
Released Thursday, October 3, 2024.
New Features
BoardDelegatenow notifies when king is in check, and provides the color of the checked king, see Issue #38.Move.checkStateandMove.disambiguationare now publicly accessible, see Issue #38.
Technical Changes
- Enable Swift 6 language mode package-wide.
GameandMoveTreeare nowSendabletypes.
ChessKit 0.12.1
Released Wednesday, September 11, 2024.
Bug Fixes
- Fix
MoveTree.fullVariation(for:)returning blank array when.minimumis passed as the index.- If this index is passed, it will automatically start from the next (valid) index and return the moves for that index.
- In practice this will mean the main variation will be returned (starting from white's first move).
ChessKit 0.12.0
Released Wednesday, August 21, 2024.
Improvements
- Conform more types to
Hashablesuch asGameandMoveTree. Game.Tagnow publicly exposesname.Game.Tagsis nowHashableandSendable.
ChessKit 0.11.0
Released Monday, August 5, 2024.
New Features
- A draw result is now published by
BoardDelegatewhen the board encounters a threefold repetition (by @joee-ca). - Convenience directional properties added to
Squaresuch asup,down,left, andrightto obtain squares in relation to the givenSquare.
Bug Fixes
File.init(_ number: Int)now correctly bounds invalid values.- i.e. Values less than 1 become
File.aand values greater than 8 becomeFile.h.
- i.e. Values less than 1 become
Technical Changes
- Test coverage has been improved.
- Parsers (
EngineLANParser,FENParser,PGNParser,SANParser) have been converted from classes to caseless enums.- This should have no effect on existing code since the class versions had private initializers.
ChessKit 0.10.0
Released Friday, June 21, 2024.
Improvements
- Update tools version to Swift 5.9 (requires Xcode 15.0 or greater).
- Conform to Swift strict concurrency and add
Sendableconformance to most objects
Breaking Changes
Gameis now astructand no longer conforms toObservableObject.- If observation semantics are required, consider using
didSetproperty observers or an object that utilizes the@Observablemacro.
- If observation semantics are required, consider using
ChessKit 0.9.0
Released Saturday, June 15, 2024.
Improvements
MoveTreenow conforms toBidirectionalCollection, allowing for more standard collection-based semantics in Swift.- Should not affect any existing functionality or API usage.
- Several methods on
MoveTreehave been deprecated in favor of theirCollectioncounterparts:previousIndex(for:)→index(before:)/hasIndex(before:)nextIndex(for:)→index(after:)/hasIndex(after:)move(at:)→subscript(_:)(e.g.tree[index])
MoveTree.annotate()now optionally returns theMoveobject after annotation.MoveTree.path()now returns tuple with named parameters (directionandindex).
Bug Fixes
- Removed
CustomDebugStringConvertibleconformance fromBitboardto avoid affecting allUInt64debug prints.- To print the string representation of
BitboarduseBitboard.chessString().
- To print the string representation of
ChessKit 0.8.0
Released Friday, June 7, 2024.
Improvements
- Add support for draw by insufficient material (by @joee-ca).
- Once this condition is reached
.draw(.insufficientMaterial)will be published via theBoardDelegate.didEnd(with:)method.
- Once this condition is reached
- Add unicode variant selector when printing black pawn icon to avoid displaying emoji (by @joee-ca).
Bug Fixes
- Fix issue where king could castle through other pieces (by @TigranSaakyan).
ChessKit 0.7.1
Released Monday, May 6, 2024.
- Fix
MoveTree.previousIndex(for:)when provided index is one afterminimumIndex.
ChessKit 0.7.0
Released Monday, April 29, 2024.
Improvements
- Add
startingIndexandstartingPositiontoGame.startingIndextakes into account thesideToMoveofstartingPosition.
Bug Fixes
- Fix rare en passant issue that could allow the king to be left in check, see Issue #18.
ChessKit 0.6.0
Released Friday, April 19, 2024.
Improvements
- Enable
chesskit-swiftto run on oldest platform possible without code changes.- Now works on iOS 13+, macOS 10.15+, tvOS 13+, watchOS 6+.
- Annotations on moves in the
MoveTreecan now also be updated viaGame.annotate(moveAt:assessment:comment:).
Bug Fixes
- Fix
MoveTreenot properly publishing changes viaGame. - Fix
Board.EndResult.repetitionspelling.- This isn't made available yet but will be implemented in an upcoming release.
ChessKit 0.5.0
Released Sunday, April 14, 2024.
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
colorparameter 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:).
ChessKit 0.4.0
Released Saturday, April 13, 2024.
Improvements
Boardmove 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
CustomStringConvertibleconformance toBoardandPositionto allow for printing chess board representations, useful for debugging. - Add
ChessKitConfigurationwith static configuration properties for the package.- Currently the only option is
printModeto determine how pieces should be represented when printingBoardandPositionobjects (see previous item).
- Currently the only option is
Breaking Changes
EnPassanthas been made aninternal struct. It is used interally byPositionandBoard.
Deprecations
Position.toggleSideToMove()is now private and handled automatically when callingmove(). The public-facingtoggleSideToMove()has been deprecated.
ChessKit 0.3.2
Released Saturday, December 2, 2023.
Fixes
- Made
fileandrankpublic properties ofSquare.
ChessKit 0.3.1
Released Friday, November 24, 2023.
Improvements
- Add
CaseIterableconformance to severalPieceandSquareenums:Piece.ColorPiece.KindSquare.Color
ChessKit 0.3.0
Released Wednesday, June 21, 2023.
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
PGNElementto just contain a single.movecase.- i.e.
.whiteMoveandblackMovehave been removed and consolidated.
- i.e.
Fixes
- Fix behavior of
previousIndex(for:)andnextIndex(for:)inMoveTree.- Especially when the provided
indexis equal to.minimum.
- Especially when the provided
ChessKit 0.2.0
Released Wednesday, May 31, 2023.
New Features
-
MoveTreeandMoveTree.Indexobjects to track move turns and variations.Game.movesis now aMoveTreeobject instead of[Int: MovePair]MoveTree.Indexincludes piece color and variation so it can be used to directly identify any single move within a game- Use the properties and functions of
MoveTreeto retrieve moves within the tree as needed
-
make(move:index:)andmake(moves:index:)with ability to make moves onGamewith 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.positionsis 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.assessmentandMove.commentdirectly instead
- Modify
MovePair- Use
Movein conjuction withMoveTree.Indexto track move indicies
- Use
colorparameter fromSANParser.parse()- The color is now obtained from the
sideToMovein the providedposition
- The color is now obtained from the
ChessKit 0.1.2
Released Thursday, May 11, 2023.
- Add documentation for all public members
- Add default starting position for
Gameinitializer - Add ability to annotate moves via
Game
ChessKit 0.1.1
Released Wednesday, April 12, 2023.
- Downgrade required Swift version to 5.7
- Allows use with Xcode 14.2 on GitHub Actions
ChessKit 0.1.0
Released Tuesday, April 11, 2023.
- Initial release