2025-02-17 10:29:35 +01:00
2024-08-02 11:16:49 +02:00
2025-02-17 10:29:35 +01:00
2024-10-07 00:39:39 -04:00
2024-08-01 10:52:16 +02:00
2025-02-17 10:29:35 +01:00
2025-02-17 10:29:35 +01:00
2022-09-06 12:40:03 +02:00
2024-10-21 09:47:54 +02:00
2022-07-20 11:06:56 +02:00
2024-10-19 15:07:49 +02:00
2023-06-20 18:42:18 +02:00

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

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:

S
Description
Dart chess library for native platforms
Readme GPL-3.0 1.6 MiB
Languages
Dart 100%