endplay.dds.parscore

Par contract and scoring function

Classes:

ParList(data)

Functions:

par(deal, vul, dealer)

Calculate the par contract result for the given deal.

class endplay.dds.parscore.ParList(data: parResultsMaster)

Bases: Iterable

Attributes:

_abc_impl

score

return:

The score associated with the par contracts

_abc_impl = <_abc._abc_data object>
property score: int
Returns:

The score associated with the par contracts

endplay.dds.parscore.par(deal: Union[Deal, DDTable], vul: Union[Vul, int], dealer: Player) ParList

Calculate the par contract result for the given deal.

Parameters:
  • deal – The deal to calculate the par result of. If you have already precomputed a DDTable for a deal then you speed up the par calculation by passing that instead of the Deal object

  • vul – The vulnerability of the deal. If you pass an int then this is converted from a board number into the vulnerability of that board

  • dealer – The dealer of the board.