Chess-Challenge icon indicating copy to clipboard operation
Chess-Challenge copied to clipboard

Consider making the saved games real PGN files

Open DrBrask opened this issue 2 years ago • 3 comments

The only thing that seems to be missing is the result marker at the end of the movetext.

Also consider not saving the first empty DrawByArbiter game that is always there.

If this is fixed and the games are saved with the PGN extension instead of txt the games can then be opened in programs like Arena.

See the end of the "movetext" section here: Wikipedia on the PGN format

Actual PGN spec

DrBrask avatar Jul 21 '23 18:07 DrBrask

That would be an interesting addition. And the FEN files could have similar changes. Though one should note that most chess program normally give also the option to open txt files as pgn.

Also note that this program doesn't follow exactly the standard since it has cases like [Result "Repetition"] which suggest that "standard format" may not be the intended use. Another note is that i don't know about Arena but most chess applications recognize that pgn is not a standard that people enforce very strictly historically wise. So chess apps usually give some leeway when dealing with incompatibilities in pgn.

audiBookning avatar Jul 23 '23 18:07 audiBookning

Sorry it's not really relevant but where are the games saved/ how do I save them?

mrgwbland avatar Jul 23 '23 23:07 mrgwbland

edit: made a mistake in my assumptions. To save the games you just have to click on the save button but it seem that at this time it will only save games that have been completed. That is, including bot vs bot games and also your own game when it has ended.

To games are saved in your {AppFolder}/ChessCodingChallenge/games. That directory will change depending on your OS. There are different manners to find it but in this case it is easy. The game prints the whole path in the console.

audiBookning avatar Jul 24 '23 01:07 audiBookning