The Game type and related functions.
At the moment, a game is little more than a sequence of moves, and a current position. There is no support for annotation in the form of comments or variations. Support for tree-like games with recursive variations and comments are planned for a future version of this library.
Tries to create a Game from a PGN string. Returns Nothing if PGN
parsing fails, or if there are illegal or ambiguous moves.
The previous move in the game, i.e. the move that resulted in the
current game position. Returns Nothing if we're at the beginning of the
game.
The next move in the game from the current position. Returns Nothing if
we're at the end of the game.
Jump to the given game ply number. If the ply is less than 0, goes to the beginning of the game. If the ply is bigger than the length of the game, goes to the end of the game.
Step one move forward, unless we are already at the end of the game. If we are already at the end, do nothing.
Step one move backward, unless we are already at the beginning of the game. If we are already at the beginning, do nothing.
Go to the beginning of the game.
Are we at the beginning of the game?
Type representing a chess game.