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

International draughts (10x10) engine with FMJD-style tournament rules, FEN-compatible with draughts.js.

example/lib/main.dart

import 'package:draughts_engine/draughts_engine.dart';

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

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

  final moves = game.legalMoves();
  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.makeMove(m);
    print('Turn: ${game.turn}');
    print('FEN: ${game.fen}');
    print('Result: ${game.result}');
  }
}
1
likes
140
points
26
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

International draughts (10x10) engine with FMJD-style tournament rules, FEN-compatible with draughts.js.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, meta

More

Packages that depend on draughts_engine