14 Commits
Author SHA1 Message Date
Paolo Di Lorenzo 022086aa94 Codable conformance (#71)
Enabled `Codable` conformance for all public types (except `Board`).
This allows objects derived from `ChessKit` to be encoded/decoded for
storage or network transmission.

#### `Board` conformance to Codable
`Board` conformance will be enabled once `BoardDelegate` is removed
completely. Until then, `Board.position` and `Board.state` can be
encoded/decoded instead as a reasonable proxy.

> [!note]
Using `position`/`state` alone will lack the position count information
used to calculate threefold repetition.
2025-11-12 18:28:41 -05:00
Paolo Di Lorenzo c2b52414f1 Clean up divider mark comments 2025-06-08 18:37:05 -04:00
Paolo Di Lorenzo 5b17fe284a Improve various minor areas of code and test coverage 2025-06-08 16:41:25 -04:00
Paolo Di Lorenzo 1a17248326 Add positional assessments 2025-06-07 22:45:23 -04:00
Paolo Di Lorenzo aecf1d7a8e Implement updated PGNParser and update related tests
New parser uses iterative state machines with multiple passes (lexer + parser).
2025-06-07 21:19:05 -04:00
Amir Zucker 8bbe59dbed bugfix/end_index_incorrect_after_the_first_half_move - updated lastMainVariationIndex in guard else clause. 2025-01-26 02:59:20 +02:00
Paolo Di Lorenzo 98af20882c Ensure MoveTree.Node is sendable 2024-10-03 17:20:42 -04:00
Paolo Di Lorenzo 566e5f14f6 Set package swift tools version to 6.0 2024-09-28 13:17:11 -04:00
Paolo Di Lorenzo 873661ac5b Apply swift format config 2024-09-27 22:27:02 -04:00
Paolo Di Lorenzo e420a474d5 Fix blank variation returned for minimum index (#42)
* Passing in `.minimum` to `MoveTree.fullVariation(for:)` returned an
empty array even if there were valid moves in the move tree.
* If this value is passed, it will use the first valid index
(`.minimum.next`) to calculate the moves contained in the variation.
2024-09-11 16:01:58 -04:00
Paolo Di Lorenzo 17aa97adc4 Remove redundant equatable conformances and make Game and MoveTree hashable 2024-08-21 12:58:01 -04:00
Paolo Di Lorenzo 21abb49725 Enable strict concurrency in Swift (#34)
* Update to `swift-tools-version: 5.9`
* Resolve strict concurrency warnings
* Add `Sendable` conformance to most objects where possible
2024-06-18 14:35:12 -04:00
Paolo Di Lorenzo 3790373e50 Add move tree collection documentation and rename some tests 2024-06-14 12:39:07 -04:00
Paolo Di Lorenzo 118765380b Clean up move tree and index file structure and naming 2024-06-13 22:30:55 -04:00