Read, Write, Create and Explore Chess Games
Go back in the game tree, reverting the last move from current branch
Get information about the current board given a color
Get information about the current board
Get information about the current board given a move
Convert a board to either unicode or ASCII string
Get FEN representation of board
Advance in the game tree, playing next move from current branch
Create a new game
Convert glyph to NAG
Get number of half-moves since the last capture or pawn move
Install python-chess
Branch game with next move
Make moves and create variations
Make moves and create variations
Get number of move
Get all legal moves available
Parse Numeric Annotation Glyph (NAG) of a move
Get comment for a move
Parse move in context
Get PGN for node of a game
Pipe operator
Move a piece on the board
Plot rendering of the board
Get number of ply
Print board
Print game node
Print a list of variations
Read a game from a PGN
Get result of the game ("*" if it hasn't ended)
Get the root node of a game
Get whose turn it is
Follow variation of a move, playing its first move
Get all variations for next move (the children of current node)
Save a game as an PGN
Save an SVG with rendering of the board
This is an opinionated wrapper around the python-chess package. It allows users to read and write PGN files as well as create and explore game trees such as the ones seen in chess books.