get_result | R Documentation |
This function takes a character string of SAN format chess moves and returns the result of the game.
get_result(movetext)
movetext |
A character string of SAN format chess moves. |
The functions looks for one of the four possible game termination markers defined by the PGN specification ("0-1", "1-0", "1/2-1/2", or "*") and returns the marker if found. If no marker is found it returns NA.
The termination marker of the game if found, otherwise NA.
If multiple markers are present, only the first one is returned.
get_result("1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 1-0")
get_result("1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 1/2-1/2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.