Skip to content

Releases: chesskit-app/chesskit-swift

ChessKit 0.15.0

19 Jun 21:41
2c5620f
Compare
Choose a tag to compare

New Features

  • Command line interface, view and test ChessKit features using swift run chesskit-cli
    • See provided usage when running chesskit-cli for available commands.
  • Position now includes an assessment property for positional assessments.
    • Possible values for assessment are part of the new Position.Assessment enum.
    • These are based on the standardized Numerical Annotation Glyphs (also used for Move.Assessment).
    • Game and MoveTree have methods to update positional assessments.

Improvements

  • Rewrote PGNParser to be more efficient and reliable.
    • Now parses PGN text more flexibly, accounting nested variations.
    • PGNParser.parse(game:) has replaced the now deprecated PGNParser.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 from PGNParser.
    • Now parses Position.Assessment (see above).
  • Add Move.Assessment(notation:) initializer.
  • Add all property to Game.Tags to return array of all named tags.
  • Add CustomStringConvertible conformance to Game and Move.

Bug Fixes

  • Fix SANParser not parsing en passant captures properly (by Rob Raese).
  • Fix parsing of "PlyCount", "TimeControl", and "SetUp" PGN tags.

Full Changelog: 0.14.0...0.15.0

ChessKit 0.14.0

04 Jun 02:53
ae95923
Compare
Choose a tag to compare
ChessKit 0.14.0 Pre-release
Pre-release

New Features

  • Add willPromote() to BoardDelegate (by @Amir-Zucker).
    • Called when pawn reaches last rank but before Board.completePromotion() is called.

Improvements

  • PGNParser now parses * game results (indicating game in progress, abandoned, unknown, etc.).
  • Add CustomStringConvertible conformance to Piece, Piece.Color, and Piece.Kind.
  • Migrate all unit tests (expect performance tests) from XCTest to Swift Testing.

Bug Fixes

  • Fix issue where MoveTree.endIndex is 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 (and PGNParser) 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-nil Game.

New Contributors

Full Changelog: 0.13.0...0.14.0

ChessKit 0.13.0

03 Oct 22:05
b90faac
Compare
Choose a tag to compare
ChessKit 0.13.0 Pre-release
Pre-release

New Features

  • BoardDelegate now notifies when king is in check, and provides the color of the checked king, see Issue #38.
  • Move.checkState and Move.disambiguation are now publicly accessible, see Issue #38.

Technical Changes

  • Enable Swift 6 language mode package-wide.
  • Game and MoveTree are now Sendable types.

Full Changelog: 0.12.1...0.13.0

ChessKit 0.12.1

11 Sep 20:30
5e982e8
Compare
Choose a tag to compare
ChessKit 0.12.1 Pre-release
Pre-release

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

21 Aug 17:22
9bdb462
Compare
Choose a tag to compare
ChessKit 0.12.0 Pre-release
Pre-release

Improvements

  • Conform more types to Hashable such as Game and MoveTree.
  • Game.Tag now publicly exposes name.
  • Game.Tags is now Hashable and Sendable.

Full Changelog: 0.11.0...0.12.0

ChessKit 0.11.0

06 Aug 01:45
3c8e1b8
Compare
Choose a tag to compare
ChessKit 0.11.0 Pre-release
Pre-release

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 as up, down, left, and right to obtain squares in relation to the given Square.

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 become File.h.

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

21 Jun 20:14
cf39da1
Compare
Choose a tag to compare
ChessKit 0.10.0 Pre-release
Pre-release

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 a struct and no longer conforms to ObservableObject.
    • If observation semantics are required, consider using didSet property observers or an object that utilizes the @Observable macro.

Full Changelog: 0.9.0...0.10.0

ChessKit 0.9.0

15 Jun 18:27
ef0523d
Compare
Choose a tag to compare
ChessKit 0.9.0 Pre-release
Pre-release

Improvements

  • MoveTree now conforms to BidirectionalCollection, 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 their Collection 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 the Move object after annotation.
  • MoveTree.path() now returns tuple with named parameters (direction and index).

Bug Fixes

  • Removed CustomDebugStringConvertible conformance from Bitboard to avoid affecting all UInt64 debug prints.
    • To print the string representation of Bitboard use Bitboard.chessString().

Full Changelog: 0.8.0...0.9.0

ChessKit 0.8.0

07 Jun 14:22
dd6eb04
Compare
Choose a tag to compare
ChessKit 0.8.0 Pre-release
Pre-release

Improvements

  • Add support for draw by insufficient material (by @joee-ca).
    • Once this condition is reached .draw(.insufficientMaterial) will be published via the BoardDelegate.didEnd(with:) method.
  • 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

Full Changelog: 0.7.1...0.8.0

ChessKit 0.7.1

07 May 02:16
445d1fd
Compare
Choose a tag to compare
ChessKit 0.7.1 Pre-release
Pre-release
  • Fix MoveTree.previousIndex(for:) when provided index is one after minimumIndex.

Full Changelog: 0.7.0...0.7.1