endplay.types.player
Classes:
|
Encoding for player seat |
- class endplay.types.player.Player(*values)
Bases:
IntEnumEncoding for player seat
Attributes:
Methods:
enumerate(iterable[, step])Return an iterator whose next method returns a tuple containing a Player (starting from this player) and the values obtained from iterating over iterable, where the player increments each time by step rotations clockwise
find(name)Convert a string into a Player object
from_board(n)Return the player who is the dealer of the corresponding board
from_lin(n)Convert a BBO LIN representation of a player into a Player object.
is_vul(vul)Iterate over all four players, clockwise, starting from this player
iter_order(order)Iterate over a sequence of players in a given order
next([n])prev([n])to_lin()turns_to(other)Return the number of positions clockwise other is from self
- property abbr: str
- Returns:
A single character string for the player name
- east = 1
- enumerate(iterable: Iterable, step: int = 1) Iterator
Return an iterator whose next method returns a tuple containing a Player (starting from this player) and the values obtained from iterating over iterable, where the player increments each time by step rotations clockwise
- static from_lin(n: int) Player
Convert a BBO LIN representation of a player into a Player object. The conversion is determined by 1=S, 2=W, 3=N, 4=E
- iter_from() Iterator[Player]
Iterate over all four players, clockwise, starting from this player
- Returns:
An iterator over all four players in play order
- static iter_order(order: str) Iterator[Player]
Iterate over a sequence of players in a given order
- Parameters:
order – The specified order as a four-character string or list of strings
- Returns:
An iterator over the players in the specified order
- north = 0
- south = 2
- to_lin() int
- west = 3