Skip to content

Implement, test, document node properties #11

@tturocy

Description

@tturocy

There is a boilerplate Node class in the Cython interface, wrapping the C++ class GameNode. The following operations should be implemented:

  • Read-only property 'infoset' (corresponds to C++ GetInfoset())
  • Read-only property 'player' (corresponds to C++ GetPlayer())
  • Read-only property 'parent' (C++ GetParent())
  • Read-only property 'prior_action' (C++ GetPriorAction())
  • Read-only property 'next_action' (C++ GetNextAction())
  • Read-only property 'prior_sibling' (C++ GetPriorSibling())
  • Read-only property 'next_sibling' (C++ GetNextSibling())
  • Read-only property 'is_terminal' (C++ IsTerminal())
  • Read-only property 'outcome' (C++ GetOutcome(). SetOutcome() also exists but will be handed in a separate issue.)
  • Member function is_successor_of (C++ IsSuccessorOf())
  • Member function is_subgame_root (C++ IsSubgameRoot())

Most of these properties can return players, nodes, etc. which are null. They should be rendered as 'None' in the Python interface.

In addition, these and the other existing operations should be documented, and entries made into the test suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions