Skip to content

Indexing outcome payoffs #2

@tturocy

Description

@tturocy

Outcome payoffs can be obtained via indexing using the __getitem__ operator. This takes an integer corresponding to the number the player appears in the list of players in the game.

  • Enhancement: Support indexing by player labels (text strings). If there are players with duplicate labels in the game, raise a suitable exception. (That is, it is up to the user to keep player labels unique within a game.)
  • Enhancement: Support indexing by player objects. The player object needs to belong to the appropriate game, otherwise an exception should be raised.
  • Additional test cases: Ensure that unexpected input raises appropriate exceptions.

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