Releases: chesskit-app/chesskit-swift
Releases · chesskit-app/chesskit-swift
ChessKit 0.13.0
New Features
BoardDelegate
now notifies when king is in check, and provides the color of the checked king, see Issue #38.Move.checkState
andMove.disambiguation
are now publicly accessible, see Issue #38.
Technical Changes
- Enable Swift 6 language mode package-wide.
Game
andMoveTree
are nowSendable
types.
Full Changelog: 0.12.1...0.13.0
ChessKit 0.12.1
Bug Fixes
- Fix
MoveTree.fullVariation(for:)
returning blank array when.minimum
is 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).
Full Changelog: 0.12.0...0.12.1
ChessKit 0.12.0
Improvements
- Conform more types to
Hashable
such asGame
andMoveTree
. Game.Tag
now publicly exposesname
.Game.Tags
is nowHashable
andSendable
.
Full Changelog: 0.11.0...0.12.0
ChessKit 0.11.0
New Features
- A draw result is now published by
BoardDelegate
when the board encounters a threefold repetition (by @joee-ca). - Convenience directional properties added to
Square
such asup
,down
,left
, andright
to 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.a
and 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.
Full Changelog: 0.10.0...0.11.0
ChessKit 0.10.0
Improvements
- Update tools version to Swift 5.9 (requires Xcode 15.0 or greater).
- Conform to Swift strict concurrency and add
Sendable
conformance to most objects
Breaking Changes
Game
is now astruct
and no longer conforms toObservableObject
.- If observation semantics are required, consider using
didSet
property observers or an object that utilizes the@Observable
macro.
- If observation semantics are required, consider using
Full Changelog: 0.9.0...0.10.0
ChessKit 0.9.0
Improvements
MoveTree
now conforms toBidirectionalCollection
, allowing for more standard collection-based semantics in Swift.- Should not affect any existing functionality or API usage.
- Several methods on
MoveTree
have been deprecated in favor of theirCollection
counterparts:previousIndex(for:)
→index(before:)
/hasIndex(before:)
nextIndex(for:)
→index(after:)
/hasIndex(after:)
move(at:)
→subscript(_:)
(e.g.tree[index]
)
MoveTree.annotate()
now optionally returns theMove
object after annotation.MoveTree.path()
now returns tuple with named parameters (direction
andindex
).
Bug Fixes
- Removed
CustomDebugStringConvertible
conformance fromBitboard
to avoid affecting allUInt64
debug prints.- To print the string representation of
Bitboard
useBitboard.chessString()
.
- To print the string representation of
Full Changelog: 0.8.0...0.9.0
ChessKit 0.8.0
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).
New Contributors
- @joee-ca made their first contribution in #26
- @TigranSaakyan made their first contribution in #28
Full Changelog: 0.7.1...0.8.0
ChessKit 0.7.1
- Fix
MoveTree.previousIndex(for:)
when provided index is one afterminimumIndex
.
Full Changelog: 0.7.0...0.7.1
ChessKit 0.7.0
Improvements
- Add
startingIndex
andstartingPosition
toGame
.startingIndex
takes into account thesideToMove
ofstartingPosition
.
Bug Fixes
- Fix rare en passant issue that could allow the king to be left in check, see Issue #18.
New Contributors
Full Changelog: 0.6.0...0.7.0
ChessKit 0.6.0
Improvements
- Enable
chesskit-swift
to 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
MoveTree
can now also be updated viaGame.annotate(moveAt:assessment:comment:)
.
Bug Fixes
- Fix
MoveTree
not properly publishing changes viaGame
. - Fix
Board.EndResult.repetition
spelling.- This isn't made available yet but will be implemented in an upcoming release.
Full Changelog: 0.5.0...0.6.0