whist_core.session.distribution

Wraps player’s team assignment.

Classes

DistributionEntry

Player to team assignment.

Distribution

All player to team assignment.

Module Contents

class whist_core.session.distribution.DistributionEntry

Bases: pydantic.BaseModel

Player to team assignment.

player_index: int
team_id: int
class whist_core.session.distribution.Distribution

Bases: pydantic.BaseModel

All player to team assignment.

entries: list[DistributionEntry] = []
__iter__()

Iterates over all entries.

__len__()

Returns the list of entries.

__getitem__(item)

Gets on specific entry. :param item: index of the item

Parameters:

item (int)

Return type:

DistributionEntry

add(entry)

Adds a new entry to the list. :param entry: to be added :return: None

Parameters:

entry (DistributionEntry)

Return type:

None