add support for SAN notation parsing and generation#30
Merged
winapiadmin merged 16 commits intomainfrom Dec 11, 2025
Merged
Conversation
- Implement parseSan function to parse Standard Algebraic Notation moves - Add moveToSan function to convert moves to SAN strings - Introduce IllegalMoveException and AmbiguousMoveException for error handling - Refactor code by moving squares_between_bb generation to attacks.cpp - Update parse_square to handle invalid inputs gracefully - Fix copy constructor in position.h and adjust is_castling method - Reorganize and update test cases in tests.cpp - Add new non_core_tests.cpp file for additional tests - Enhance CMakeLists.txt with new test executable - [critical] Hotfix for #29 for implementation-defined global initialization routine This adds comprehensive SAN support, improving move input/output capabilities for better chess engine integration, and fix a UB of the library
- Updated the output operator for pieces to use a switch-case structure for better readability and maintainability. - Removed the previous string_view mapping for piece representation. - Enhanced the template specialization for the output operator to include PieceC directly. - Cleaned up the code in `types.h` by formatting enums for better clarity and consistency. - Added missing includes and ensured proper use of forward declarations. - Removed unnecessary debug output in tests to streamline test results.
Updated comment to clarify which trailing annotations are stripped.
… into san_notations
Updated the GitHub Actions workflow for clang-format to include permissions and a new job structure, allowing automatic formatting and committing of changes.
This was referenced Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds comprehensive SAN support, improving move input/output capabilities for better chess engine integration, and fix a UB of the library