This patch allows the user to load games using PGN files. The parsing
is not complete and has a bunch of work left to be done, but it's
okay for our use case here. It can load all of the games our PGN
exporter can save. As the Chess program impoves so can the PGN parser.
You can now copy the board state as Forsyth-Edwards Notation. You can
then paste this into other chess programs/games, or into ours when
it gets implemented.
This patch adds an option to the menubar for exporting the current
game as a PGN file. This file can then be read by other chess
programs (and ours eventually) to replay the game or analyze it.
The implementation is mostly PGN spec compliant, however the code
could use some more work. Particularly the `const_cast`s...
But it's a start. :^)
Fixup: Chess: Fixed hard-coded home path in unveil() call
Fixup: Chess: Removed castling flags from Move struct
The castling detection logic is done inside Move::to_algebraic()
now, removing the need for is_castle_short and is_castle_long flags
inside of the Move struct.
A player can no longer move the King piece into any position on
their home rank if the move would place the King in check.
A player can also no longer ignore a check position when in check
by a pawn on their home rank. The player must now resolve the check
during their move.