Skip to content

(bugfix) Game.PushNotationMove() fails to push for PGN games#63

Merged
CorentinGS merged 1 commit intoCorentinGS:mainfrom
mikeb26:fixPushNotationMoveAppendFail
Jul 21, 2025
Merged

(bugfix) Game.PushNotationMove() fails to push for PGN games#63
CorentinGS merged 1 commit intoCorentinGS:mainfrom
mikeb26:fixPushNotationMoveAppendFail

Conversation

@mikeb26
Copy link
Contributor

@mikeb26 mikeb26 commented Jul 18, 2025

When a Game is initialized via PGN(), subsequent moves appended to the original via Game.PushNotationMove() are not being appended. (The game's position gets updated, but the move is missing). The root cause is Parser.Parse() fails to initialize Game.currentMove to the last move of the PGN, so Game.addNewMove() was not adding the move as expected. Added a new test to catch this as well as augmented an existing PGN read test.

When a Game is initialized via PGN(), subsequent moves appended to the
original via Game.PushNotationMove() are not being appended. (The
game's position gets updated, but the move is missing). The root cause
is Parser.Parse() fails to initialize Game.currentMove to the last
move of the PGN, so Game.addNewMove() was not adding the move as expected.
Added a new test to catch this as well as augmented an existing PGN
read test.
@CorentinGS CorentinGS merged commit c38f7b5 into CorentinGS:main Jul 21, 2025
6 checks passed
mikeb26 added a commit to mikeb26/chesstools that referenced this pull request Jul 24, 2025
This commit updates dependencies to ensure
CorentinGS/chess#63 is included. Without this
repmk misbehaves and skips positions in its output. Additionally this
commit adds additional tests and guards to catch this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants