endplay.types.bid
Classes:
|
Base class representing an auction call. |
|
Class representing a call that names a contract, i.e. has a level and strain. |
|
Class representing a call that does not name a contract, i.e. pass, double or redouble. |
- class endplay.types.bid.Bid(name: str, alertable: bool = False, announcement: str | None = None)
Bases:
objectBase class representing an auction call. This class provides a convenience constructor from a string, but upon construction will automatically donwcast its type to one of
ContractBidorPenaltyBiddepending on the type of the call.- Variables:
alertable (bool) – Flag indicating whether the bid is alertable
announcement (Optional[str]) – String transcription of the announcement for this bid
Attributes:
Methods:
Returns a typecasts to ContractBid if this is a contract bid, otherwise returns None
Returns a typecasts to PenaltyBid if this is a penalty bid, otherwise returns None
- alertable: bool
- announcement: str | None
- as_contract() ContractBid | None
Returns a typecasts to ContractBid if this is a contract bid, otherwise returns None
- as_penalty() PenaltyBid | None
Returns a typecasts to PenaltyBid if this is a penalty bid, otherwise returns None
- class endplay.types.bid.ContractBid(level: int, denom: Denom, alertable: bool = False, announcement: str | None = None)
Bases:
BidClass representing a call that names a contract, i.e. has a level and strain
- Variables:
level (int) – The level of the call (between 1 and 7)
denom – The strain of the call
alertable (bool) – Flag indicating whether the bid is alertable
announcement (Optional[str]) – String transcription of the announcement for this bid
- class endplay.types.bid.PenaltyBid(penalty: Penalty, alertable: bool = False, announcement: str | None = None)
Bases:
BidClass representing a call that does not name a contract, i.e. pass, double or redouble
- Variables:
penalty (Penalty) – The type of the call
alertable (bool) – Flag indicating whether the bid is alertable
announcement (Optional[str]) – String transcription of the announcement for this bid