Closed topse closed 1 month ago
Hi,
Sorry for the late reply. This library purposely defines a single castling move format as the king to rook move. I agree this is not very clear and should be documented.
We're using this helper to get the alternative castling moves: https://github.com/lichess-org/flutter-chessground/blob/main/lib/src/utils.dart#L9
Added some doc comment to the legalMoves
getter. Hope it is clearer how to use it now.
Hi,
Library Version: dartchess: ^0.6.1
I am using the following test-code to query the allowed moves of the king:
Expected: King has two fields, f1 and g1 (in case of castling). Problem: legalMovesOf gives back the fields f1 and h1, which seems to be odd?
When executing a move, it is possible to execute the move
chess.play(NormalMove(from: Squares.e1, to: Squares.g1));
, which again seems to be odd, as g1 is not recognized as a legal move.Best Regards, Tobias