Commit Graph

235 Commits

Author SHA1 Message Date
Vincent Velociter ab307f5bfa Improve Position types 2025-02-10 14:50:05 +01:00
Vincent Velociter e46db9ec24 Remove unused import 2024-10-19 15:08:19 +02:00
Vincent Velociter 0d1add722b Fix castling rights parsing 2024-10-19 15:05:05 +02:00
Vincent Velociter c8c13d0d7f Merge pull request #42 from KMK-Git/pgn-fix-flagbased
Fix PGN test by differentiating single and multigame PGN parsing
2024-10-16 10:20:03 +02:00
Vincent Velociter c1516b33d0 Use an enum for PieceKind 2024-10-09 17:55:17 +02:00
Kaustubh Khavnekar 66361cc5be Fix empty line handling by presplitting multigame PGN 2024-10-07 01:15:30 -04:00
Kaustubh Khavnekar 331c24b89e Revert "Add flag to indicate whether single game or multi game pgn is being parsed, handle linebreaks accordingly"
This reverts commit db66704b0e.
2024-10-07 00:40:43 -04:00
Kaustubh Khavnekar e97e820f2d Revert "Fix comment"
This reverts commit 80f5af523b.
2024-10-07 00:40:36 -04:00
Kaustubh Khavnekar 03cc1a8a14 Fix for comment at end of line 2024-10-07 00:39:39 -04:00
Kaustubh Khavnekar 80f5af523b Fix comment 2024-10-03 00:16:28 -04:00
Kaustubh Khavnekar db66704b0e Add flag to indicate whether single game or multi game pgn is being parsed, handle linebreaks accordingly 2024-10-02 23:01:52 -04:00
Vincent Velociter d50bf0c9f9 Fix isLegal and normalizeMove
Position.isLegal was generating illegal moves from the king due to a bug
in _getCastlingSide.

Fixes #25
Closes #27
2024-08-02 12:09:23 +02:00
Vincent Velociter a9d42cbade Document legalMoves castling format
Re-introduce `makeLegalMoves` to export legal moves in a convenient
format.

Closes #33
2024-08-02 11:10:33 +02:00
Vincent Velociter 05af18077d Add more san disambiguation tests 2024-08-02 10:39:30 +02:00
Vincent Velociter 065eb4d494 Refactoring 2024-08-02 10:13:43 +02:00
Vincent Velociter 95ff91e03f Wip on removing Box 2024-08-02 09:24:20 +02:00
Vincent Velociter 949408b3f8 Refactor Errors types
Closes #40
2024-08-01 14:48:57 +02:00
Vincent Velociter 6d154d261f Tweak 2024-08-01 13:04:34 +02:00
Vincent Velociter f9b9e0e75a Remove Coord type 2024-08-01 12:35:46 +02:00
Vincent Velociter 48311c5f9a Add Square.fromCoords 2024-08-01 12:33:17 +02:00
Vincent Velociter 7adc5f9889 More refactoring: remove utils 2024-08-01 10:52:16 +02:00
Vincent Velociter 485131f6c0 Tweak API 2024-08-01 10:29:26 +02:00
Vincent Velociter 81690367cb Update Move api 2024-07-31 17:53:33 +02:00
Vincent Velociter 63f2b2bd3e Add file and rank getters to Coord 2024-07-31 12:00:06 +02:00
Vincent Velociter bbcb028131 Add the Coord extension type 2024-07-31 11:32:46 +02:00
Vincent Velociter a971758f19 Tweak offset API 2024-07-31 10:58:31 +02:00
Vincent Velociter e4e4edeb14 Add more tests 2024-07-31 10:31:17 +02:00
Vincent Velociter 470ef705f0 Use extension types for File, Rank and Square 2024-07-31 10:09:28 +02:00
Vincent Velociter 71a4c16ac2 Remove files and ranks constants 2024-07-30 16:57:51 +02:00
Vincent Velociter 9ee3f608a0 Refactor Square: use an enum 2024-07-30 16:53:33 +02:00
Vincent Velociter 02d77341b5 Add Piece.kind, Role.letter, Role.uppercaseLetter 2024-07-22 12:15:42 +02:00
Vincent Velociter 460fa08ded Migrate SquareSet to an extension type
Closes #37
2024-04-29 18:17:52 +02:00
Vincent Velociter ffa95005ba Add field comment 2023-11-24 17:18:01 +01:00
Vincent Velociter 720128d22e Rename Rules to Rule and add rule getter to Position 2023-11-24 17:13:49 +01:00
Vincent Velociter d4ea728972 Merge pull request #31 from Anupya/Anupya/fix-one-test-pgn-dart
Fix SmartChess test in `pgn_test.dart`
2023-11-16 10:19:12 +01:00
Vincent Velociter c7b5f71662 Twak pgn comment parser 2023-11-13 15:49:06 +01:00
Anupya Pamidimukkala fae5edab89 fix tests 2023-10-27 10:40:50 -04:00
Anupya Pamidimukkala 4480a16a20 fix formatting 2023-10-25 17:17:46 -05:00
Anupya Pamidimukkala c89fad7892 fix one test 2023-10-25 17:12:05 -05:00
Vincent Velociter e50c2a0d2f Add ply getter 2023-10-17 16:25:57 +02:00
Vincent Velociter c86cbfe735 Improve Pgn transform doc 2023-10-17 15:36:56 +02:00
Vincent Velociter bf6119e108 PgnNodeData is no more immutable, PgnComment is now fully 2023-10-17 10:38:46 +02:00
Vincent Velociter 3c390943c4 Update PgnGame doc 2023-10-16 12:56:37 +02:00
Vincent Velociter 283bf12b6d Add a bound to the PgnNode generic type 2023-10-16 12:49:19 +02:00
Vincent Velociter 1fa0ea1fa1 Prepare version 0.3.0 2023-10-14 18:32:21 +02:00
Vincent Velociter 2ef16440f5 Don't mark PgnGame as immutable since it's not 2023-10-14 18:28:21 +02:00
Vincent Velociter de6cfbf8dd Rename Headers to PgnHeaders for consistency 2023-10-14 11:44:16 +02:00
Vincent Velociter b7dddcff86 Add makeSanUnchecked and makeSan methods 2023-10-14 09:42:49 +02:00
Vincent Velociter 524a739a30 Use pattern matching 2023-08-17 15:12:50 +02:00
Vincent Velociter 5bd1829226 Tweaks 2023-06-20 18:14:03 +02:00