Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CorentinGS
Copy link
Owner

No description provided.

- Fixes issue #67: Add ability to include comments before the first move
- Modified writeMoves function to handle root move comments when isRoot=true
- Updated String() method to handle root move comments even when no children exist
- Added comprehensive tests for root move comments including:
  - Basic root move comments
  - Comments on empty games
  - Multiple comments
  - Comments with tag pairs
  - Comments with variations

The fix ensures that comments added to the root move (before any moves are made)
are properly included in the generated PGN output.
- Updated the String() method to ensure root move comments are included even when there are no child moves.
- Added multiple test cases for root move comments, covering scenarios such as comments on empty games, multiple comments, comments with tags, and comments with variations.
- Improved the structure of PGN output to maintain the correct order of tags, comments, and moves.

These changes ensure that comments added to the root move are accurately reflected in the generated PGN output.
@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.00%. Comparing base (c38f7b5) to head (10696e5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   67.92%   68.00%   +0.08%     
==========================================
  Files          27       27              
  Lines        4866     4873       +7     
==========================================
+ Hits         3305     3314       +9     
+ Misses       1433     1431       -2     
  Partials      128      128              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CorentinGS CorentinGS merged commit 3f55e9c into main Aug 6, 2025
11 checks passed
@CorentinGS CorentinGS deleted the issue-67-root-move-comments branch September 18, 2025 09:32
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