dartchess
Provides chess and chess variants rules and operations including chess move generation, read and write FEN, read and write PGN.
0.13.1
2.8K downloads/mo
#4755 most downloaded on pub.dev
lichess-org/dartchess
What this package is like to depend on
Last release 3 months ago
25 May 2026
Ships unpredictably
gaps range from 9 days to 10 months
Nearly every release is documented
notes for 23 of 23 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
23 releases · first in 2023
6 releases in the last 12 months
see the full history below
Release timeline
23 releases · Jun 2023 to May 2026Releases
latest 23-
0.13.125 May 2026Release notes
Open source →- Introduces
parseMultiGameLazyandPgnLazyGamefor lazy parsing of PGN files. These APIs allow you to iterate through games in a PGN file without parsing the moves (only the headers).
- Introduces
-
0.13.018 May 2026Release notes
Open source →Breaking changes:
- Remove
fast_immutable_collectionsdependency. Public APIs that previously returnedIMaporIListnow return standard Dart collections:Position.legalMovesreturnsMap<Square, SquareSet>(wasIMap<Square, SquareSet>)Board.materialCountreturnsByRole<int>/Map<Role, int>(wasIMap<Role, int>)Castles.rooksPositionsreturnsBySide<ByCastlingSide<Square?>>/Map(wasIMap-backed)Castles.pathsreturnsBySide<ByCastlingSide<SquareSet>>/Map(wasIMap-backed)PgnComment.shapesreturnsList<PgnCommentShape>(wasIList<PgnCommentShape>)makeLegalMoves()returnsMap<Square, Set<Square>>(wasIMap<Square, ISet<Square>>)- The
BySide<T>,ByRole<T>, andByCastlingSide<T>typedefs are now aliases for standardMaptypes.
Pockets.valueis removed; usePockets.of(side, role),Pockets.count(role),Pockets.size,Pockets.hasQuality(side), andPockets.hasPawn(side)instead.
The
Positionclass remains completely immutable. Only the return types of some methods have changed to use standard Dart collections instead of immutable collections. - Remove
-
0.12.321 Mar 2026Release notes
Open source →- Fix
Crazyhouse.isGameOverandCrazyhouse.isCheckmatein positions where all legal moves are drop moves.
- Fix
-
0.12.203 Mar 2026 -
0.12.119 Feb 2026Release notes
Open source →- Fix a bug in
Horde.hasInsufficientMaterialthat would cause a stack overflow if only one pawn was left. - Fix insufficient material detection when the Horde has a lone Queen.
- Horde positions where the king is white instead of black are now correctly considered invalid.
- Fix a bug in
-
0.12.003 Feb 2026Release notes
Open source →- Fix an en passant bug in crazyhouse and atomicchess variants. Now the perft tests cover these variants as well.
-
0.11.104 Apr 2025 -
0.11.031 Mar 2025Release notes
Open source →- Rename
makeLegalMoveparameterisChess960toincludeAlternateCastlingMovesand invert its meaning. It now defaults tofalse.
- Rename
-
0.10.017 Feb 2025 -
0.9.219 Oct 2024Release notes
Open source →- Fixes castling rights parsing from FEN.
- The FEN parser and writer now preserve syntactically valid castling rights even if there is no matching rook or king. Rename
unmovedRookstocastlingRights.
-
0.9.116 Oct 2024 -
0.9.009 Oct 2024 -
0.8.002 Aug 2024Release notes
Open source →Breaking changes:
Squareis now an extension type.- Introduce
FileandRanktypes.
Bug fixes:
- Fix
Position.isLegalthat was generating illegal king moves. - Fix
Position.normalizeMovethat could turn an illegal move into a legal castling move.
-
0.7.122 Jul 2024 -
0.7.029 Apr 2024 -
0.6.126 Jan 2024 -
0.6.024 Nov 2023 -
0.5.116 Nov 2023 -
0.5.018 Oct 2023Release notes
Open source →- Add new
plygetter toPosition PgnNodeDatais no longer specified as immutable- Make
PgnCommentreally immutable
- Add new
-
0.4.017 Oct 2023 -
0.3.014 Oct 2023Release notes
Open source →- rename
HeaderstoPgnHeadersfor consistency PgnGameisn't a const constructor anymore- tweak
parseMultiGamePgnsignature for consistency
- rename
-
0.2.014 Oct 2023Release notes
Open source →- add
makeSanandmakeSanUncheckedmethods to thePositionclass. toSanandplayToSanare now deprecated.
- add
-
0.1.020 Jun 2023