FS#7174 - Chessbox - Store game history in PGN format
Opened by Mauricio Peccorini (mpeccorini) - Tuesday, 15 May 2007, 20:50 GMT
Last edited by Nils Wallménius (nls) - Sunday, 02 September 2007, 10:12 GMT
Modifications to chessbox.c, gnuchess.c and gnuchess.h so the history of games played is stored in a file called chessbox.pgn. It considers all (up to what I know) rules of PGN annotation including the handling of checks, checkmates, taking pieces, resolution of ambiguous moves by adding the row or column of the moving piece as needed, castling kingside and queenside, promotions (only to queens since the chessbox plugin itself doesn't allow the player to choose), pawns taking "en passant", etc.
Currently, it has some limitations:
-The abbreviation of the pieces are always in english regardless of the language the player is using.
-The PGN header is constant:
[Event "Chessbox Chess Game"]
[Black "Chessbox (powered by GnuChess)"]
-The players could be swapped but you can swap them in the middle of the game and the header has already been stored at that time.
-I didn't find where to get the system date (I don't even know if this is possible at all)
-The result could be added but I'm not storing the history in memory but instead storing it as you play. I didn't want to use too much memory for this. It would be relatively easy to change though and that would lead to other improvements like "undo move" (I know, I know, that's cheating !!! ;-) ).
-The history is being stored but there's no way of watching previously played matches in the player, you have to download the file to a computer and use a different software for that (I plan to make this possible in the future but that includes adding a menu, a PGN parser and a lot of user interaction so it can take some time)
Sunday, 02 September 2007, 10:12 GMT
Reason for closing: Accepted