pygambit.gambit.Game.nodes#
- Game.nodes(subtree: Node | str | None = None) List[Node] #
Return a list of nodes in the game tree. If subtree is not None, returns the nodes in the subtree rooted at that node.
Nodes are returned in prefix-traversal order: a node appears prior to the list of nodes in the subtrees rooted at the node’s children.
- Parameters:
subtree (Node or str, optional) – If specified, return only the nodes in the subtree rooted at subtree.
- Raises:
MismatchError – If node is a Node from a different game.