pygambit.gambit.Game.to_html#

Game.to_html(filepath_or_buffer: str | Path | IOBase | None = None) str | None#

Export the game to HTML format.

Generates a rendering of the strategic form of the game as a collection of HTML tables. The first player is the row chooser; the second player the column chooser. For games with more than two players, a collection of tables is generated, one for each possible strategy combination of players 3 and higher.

Parameters:

filepath_or_buffer (str or Path or BufferedWriter or None, default None) – String, path object, or file-like object implementing a write() function. If None, the result is returned as a string.

Return type:

String representation of the game or None if the game is exported to a file

See also

to_efg, to_nfg, to_latex