draughts_engine 1.2.1 copy "draughts_engine: ^1.2.1" to clipboard
draughts_engine: ^1.2.1 copied to clipboard

A fast, fully rules-complete international 10x10 draughts engine for Dart & Flutter. Supports men & king movement, flying kings, multi-capture sequences, mandatory capture and longest-line rules, FEN [...]

example/lib/main.dart

import 'package:draughts_engine/draughts_engine.dart';

void main() {
  // Standard start position (W:W31-50:B1-20)
  final game = Draughts();

  print('Turn: ${game.turn}');
  print('FEN: ${game.fen}');
  print('Result: ${game.getWinner()}');

  final moves = game.moves();
  print('Legal moves: ${moves.length}');
  for (final m in moves.take(10)) {
    print('  $m');
  }

  if (moves.isNotEmpty) {
    // final m = moves.first;
    // print('Playing: $m');
    // game.move(m, fromve(mll, to: null);
    // print('Turn: ${game.turn}');
    // print('FEN: ${game.fen}');
    // print('Result: ${game.result}');
  }
}
1
likes
120
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A fast, fully rules-complete international 10x10 draughts engine for Dart & Flutter. Supports men & king movement, flying kings, multi-capture sequences, mandatory capture and longest-line rules, FEN loading, move generation, undo, and ASCII board rendering.

Repository (GitHub)
View/report issues

Topics

#draughts #checkers #ai #boardgame #engine

Documentation

API reference

License

unknown (license)

Dependencies

flutter, meta

More

Packages that depend on draughts_engine