chesslib icon indicating copy to clipboard operation
chesslib copied to clipboard

Rename "Variation" to "Variant"

Open ZeroOne3010 opened this issue 3 years ago • 0 comments

I propose that GameLoader and the other relevant classes are changed to read PGN tag "Variant" instead of the current "Variation". Wikipedia has this to say about the subject:

Handling chess variants Many chess variants can be recorded using PGN, provided the names of the pieces can be limited to one character, usually a letter and not a number. They are typically noted with a tag named "Variant" giving the name of the rules. The term "Variation" must be avoided, as that refers to the name of an opening variation.

As a practical example from the wild, Lichess exports the games with the "Variant" tag.

My hope would be that eventually the game loading system could be modified to ignore the variants that the library does not support, because when you export your games from Lichess, you get all the variant games as well, and the library crashes when it needs to parse certain, say, Crazyhouse moves.

If you don't see the complete renaming as a feasible plan, then a hacky way to fix the issue would be to treat the Variant tag as a synonym to the Variation tag. A third way would be to add "Variant" as a new attribute next to "Variation", keeping both. I would be willing to work on this issue and to create a pull request, once we just figure out the best way to approach it. My vote would go renaming Variation to Variant completely, though.

ZeroOne3010 avatar May 17 '21 13:05 ZeroOne3010