https://github.com/alexcmgit/chesskit
Basic Dart chess engine for board validation and move generation.
https://github.com/alexcmgit/chesskit
Last synced: about 1 year ago
JSON representation
Basic Dart chess engine for board validation and move generation.
- Host: GitHub
- URL: https://github.com/alexcmgit/chesskit
- Owner: alexcmgit
- License: gpl-3.0
- Created: 2023-01-15T22:54:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T20:29:43.000Z (over 3 years ago)
- Last Synced: 2025-04-12T16:08:32.691Z (about 1 year ago)
- Language: Dart
- Homepage:
- Size: 376 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Dart chess library for native platforms (does not support web).
## Features
- Completely immutable Position class
- Read and write FEN
- Read and write SAN
- Chess rules:
- move making
- legal moves generation
- game end and outcome
- insufficient material
- setup validation
- Chess960 support
- Chess variants: Antichess, Atomic, Crazyhouse, KingOfTheHill, ThreeCheck
- Attacks and rays using hyperbola quintessence
## Example
```dart
import 'package:dartchess/dartchess.dart';
final pos = Chess.fromSetup(Setup.parseFen('r1bqkbnr/ppp2Qpp/2np4/4p3/2B1P3/8/PPPP1PPP/RNB1K1NR b KQkq - 0 4'));
assert(pos.isCheckmate == true);
```
## Additional information
This package code was heavily inspired from:
- https://github.com/niklasf/chessops
- https://github.com/niklasf/shakmaty