A gm_game is the S3 container returned by gm_read_pgn(), gm_play()
and the study tools. It is a list with four elements:
Details
movesCharacter vector of mainline moves in standard algebraic notation, one per half-move.
positionsList of gm_position objects, one longer than
moves: the starting position followed by the position after each move.tagsNamed list of 'PGN' header tags, e.g.
EventorWhite.resultOne of
"1-0","0-1","1/2-1/2"or"*".
Use is_gm_game() to test for the class, gm_write_pgn() to serialise it
and gm_plot_eval() to visualise how the evaluation moved.
See also
Other core:
gm_legal_moves(),
gm_move(),
gm_position(),
gm_status(),
is_gm_game(),
is_gm_position()
Examples
game <- gm_read_pgn("1. e4 e5 2. Nf3 Nc6 *", text = TRUE)
game$moves
#> [1] "e4" "e5" "Nf3" "Nc6"
game$result
#> [1] "*"