Skip to main content

Crate gambit_parser

Crate gambit_parser 

Source
Expand description

A library for parsing gambit extensive form game (.efg) files

This library produces an ExtensiveFormGame, which can then be easily used to model an extensive form game.

In order to minimize memory consumption, this stores references to the underlying string where possible. One side effect is that this is a borrowed struct, and any quoted labels will still have escape sequences in them in the form of EscapedStrs.

Structs§

Chance
A chance node
EscapedStr
A string with backslash escapes in it
ExtensiveFormGame
A full extensive form game
GameDisplay
A Display adapter that writes a game in a chosen WriteMode, returned by ExtensiveFormGame::display.
Player
A player node in the game tree
Terminal
A terminal node represents the end of a game
Unescaped
An iterator over the true characters of an EscapedStr

Enums§

Error
An error that happens while trying to turn a string into an ExtensiveFormGame
Node
An arbitrary node in the game tree
ValidationError
An error that results from something invalid about the parsed extensive form game
WriteMode
How much of each shared infoset and outcome to write when serializing a game.