endplay.dds.solve

Solving functions from the DDS library, which calculate the double dummy results for playing each card in a player’s hand.

Classes:

SolvedBoard(data)

SolvedBoardList(data)

Functions:

solve_all_boards(deals[, target])

Optimized version of solve_board for multiple deals which uses threading to speed up the calculation

solve_board(deal[, target])

Calculate the double dummy score for all cards in the hand which is currently to play in a given deal

class endplay.dds.solve.SolvedBoard(data: _dds.solvedBoard)

Bases: Iterable

Attributes:

_abc_impl

_abc_impl = <_abc._abc_data object>
class endplay.dds.solve.SolvedBoardList(data: solvedBoards)

Bases: Sequence

Attributes:

_abc_impl

_abc_impl = <_abc._abc_data object>
endplay.dds.solve.solve_all_boards(deals: Iterable[Deal], target: Optional[int] = None) SolvedBoardList

Optimized version of solve_board for multiple deals which uses threading to speed up the calculation

Parameters:
  • deals – The collection of boards to be solved, each with first and trump filled

  • target – If provided, only return cards which can make at least this many tricks

endplay.dds.solve.solve_board(deal: Deal, target: Optional[int] = None) SolvedBoard

Calculate the double dummy score for all cards in the hand which is currently to play in a given deal

Parameters:
  • deal – The deal to solve, with first and trump filled in

  • target – If provided, only return cards which can make at least this many tricks