https://github.com/nsstudent/fischer-core
FischerCore is a Swift library that encapsulates the core logic and data structures necessary for building chess games. Named in honor of the legendary chess grandmaster Bobby Fischer, this library provides a comprehensive foundation for creating, managing, and enforcing the rules of chess.
https://github.com/nsstudent/fischer-core
bitboard bitboard-datastructure chess fen-notation pgn-parser swift
Last synced: 11 months ago
JSON representation
FischerCore is a Swift library that encapsulates the core logic and data structures necessary for building chess games. Named in honor of the legendary chess grandmaster Bobby Fischer, this library provides a comprehensive foundation for creating, managing, and enforcing the rules of chess.
- Host: GitHub
- URL: https://github.com/nsstudent/fischer-core
- Owner: NSStudent
- License: mit
- Created: 2024-08-23T21:43:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-12T18:13:11.000Z (11 months ago)
- Last Synced: 2025-07-12T20:24:58.170Z (11 months ago)
- Topics: bitboard, bitboard-datastructure, chess, fen-notation, pgn-parser, swift
- Language: Swift
- Homepage: https://nsstudent.dev/fischer-core/documentation/fischercore/
- Size: 3.67 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fischer-core
[](https://codecov.io/gh/NSStudent/fischer-core)
`FischerCore` is a Swift library that encapsulates the core logic and data structures necessary for building chess games.
Named in honor of the legendary chess grandmaster **Bobby Fischer**, this library provides a comprehensive foundation for creating, managing, and enforcing the rules of chess
## Swift Package Manager
You can use `FischerCore` in your project by adding it as a dependency in your `Package.swift` file:
```swift
.package(url: "https://github.com/NSStudent/fischer-core.git", from: "0.1.0")
```
Then, add `"FischerCore"` to your target's dependencies:
```swift
.target(
name: "YourTarget",
dependencies: [
.product(name: "FischerCore", package: "fischer-core")
]
)
```
## Documentation
The API reference and detailed documentation for `FischerCore` is available at:
👉 [https://nsstudent.dev/fischer-core/documentation/fischercore/](https://nsstudent.dev/fischer-core/documentation/fischercore/)
## References
This library is based on the code of other well-crafted chess engines and bitboard libraries in Swift. Notably, it builds upon the work in [Sage by @nvzqz](https://github.com/nvzqz/Sage/tree/develop), adapting and updating it to be compatible with the current state of the Swift language and modern development practices.
## Acknowledgements
Special thanks to [Point-Free](https://www.pointfree.co/) for their fantastic [swift-parsing](https://github.com/pointfreeco/swift-parsing) library, which greatly simplified the implementation of our PGN parser.
## Roadmap
The following features are planned to improve the functionality and completeness of `FischerCore`:
- [ ] Support additional PGN comment types (e.g. clock time, evaluation, annotations).
- [ ] Add performance benchmarks for parsers and move generation.
- [ ] Improve FEN parsing using a unified parser approach.
### ✅ What's Implemented
The following core features are already available:
- `Bitboard`: Efficient low-level representation of board state using bitwise operations.
- `Game`: Rule-enforced move execution, undo functionality, outcome detection, and full board state management.
- `PGN parsing`: Conversion of PGN text into structured data with support for tags, comments, and moves.
- `Move`: Encapsulates move logic with origin and destination squares, and supports conversion from `SANMove` to drive game mechanics.