Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.Game.parse_game#

classmethod Game.parse_game(text: str) Game#

Construct a game from its serialised representation in a string

Parameters:

text (str) – A string containing the game representation.

Returns:

A game constructed from the representation in the string.

Return type:

Game

Raises:

ValueError – If the contents of the file are not a valid game representation.

See also

read_game

Constructs a game from a representation in a file.