Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Dynamically display chess games from a Portable Game Notation (PGN) string or file
ResourceFunction["ChessPGNDisplay"]["pgn",n] interprets the string "pgn" as portable game notation (PGN) for chess games and displays the nth game. | |
ResourceFunction["ChessPGNDisplay"]["pgn"] displays the first game. |
Start with a PGN text string:
In[1]:= |
Display the game represented by this string:
In[2]:= |
Out[2]= |
Click forward to view the board after black’s fourth move:
In[3]:= |
Out[3]= |
Create a PGN containing multiple games and display the second game:
In[4]:= |
Out[5]= |
ChessPGNDisplay can also accept in its first argument an association of structured chess data of the type returned by ResourceFunction["ImportPGN"], or a list of such associations:
In[6]:= |
Out[6]= |
In[7]:= |
Out[7]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License