Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Make .ToEPDString() fully PGN/EPD compliant #841

Merged
merged 9 commits into from
Jul 4, 2024

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Jul 3, 2024

  • Remove e.p. for en-passant moves
  • Use O instead of o for castling moves
  • Replace existing ToEPDString() method with one that accepts a Position. Keep the former as internal. This allows to:
    • Disambiguate .ToEPDString() result when both piece types and target squares match
  • Remove .ToMoveString() method, because it's just confusing and a mixture between wanting the speed of UCI but in a easier to read but still not human form.

Fixes #840

"En passant captures do not have any special notation; they are formed as if the captured pawn were on the capturing pawn's destination square. Pawn promotions are denoted by the equal sign "=" immediately following the destination square with a promoted piece letter (indicating one of knight, bishop, rook, or queen) immediately following the equal sign. As above, the piece letter is in upper case."
@eduherminio eduherminio changed the title 🐛 Disambiguate .ToEPDString() result when both piece types and target squares match 🐛 Make .ToEPDString() fully PGN/EPD compliant Jul 3, 2024
@eduherminio eduherminio marked this pull request as ready for review July 4, 2024 21:42
@eduherminio eduherminio enabled auto-merge (squash) July 4, 2024 21:42
@eduherminio eduherminio merged commit fcc1dd9 into main Jul 4, 2024
27 checks passed
@eduherminio eduherminio deleted the bugfix/ToEPDString branch July 4, 2024 21:47
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.

.ToEPDString produces ambiguous move representations
1 participant