Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lichess-org/dartchess
Dart chess library for native platforms
https://github.com/lichess-org/dartchess
dart flutter
Last synced: about 8 hours ago
JSON representation
Dart chess library for native platforms
- Host: GitHub
- URL: https://github.com/lichess-org/dartchess
- Owner: lichess-org
- License: gpl-3.0
- Created: 2022-07-20T09:06:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T08:26:49.000Z (about 1 month ago)
- Last Synced: 2024-10-17T22:43:42.993Z (about 1 month ago)
- Topics: dart, flutter
- Language: Dart
- Homepage: https://pub.dev/packages/dartchess
- Size: 1010 KB
- Stars: 35
- Watchers: 5
- Forks: 18
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Chess and chess variant rules written in dart 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
- PGN parser and writer
- Bitboards
- 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 was heavily inspired from:
- https://github.com/niklasf/chessops
- https://github.com/niklasf/shakmaty