You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been unable to write a code example that demonstrates what the dealer parameter of the par() function is supposed to do. Is this a known/unknown bug or can someone show me what I'm doing wrong?
Example code follows:
from endplay.types import Board, Contract, Deal
from endplay.dds import par, calc_dd_table
I have been unable to write a code example that demonstrates what the dealer parameter of the par() function is supposed to do. Is this a known/unknown bug or can someone show me what I'm doing wrong?
Example code follows:
from endplay.types import Board, Contract, Deal
from endplay.dds import par, calc_dd_table
b = Board()
b.dealer = 0
b.contract = Contract()
b.contract.level = 0
b.contract.denom = 0
b.contract.declarer = 0
b.contract.result = 0
b.deal = Deal()
b.deal.north = 'K.AQ8742.K642.32'
b.deal.east = 'AQ92.KT96.98.865'
b.deal.south = 'JT3.J5.QJ5.AK974'
b.deal.west = '87654.3.AT73.QJT'
deal = b.deal.copy()
table = calc_dd_table(b.deal)
table.pprint()
print('\n====\n', deal)
par_result1 = par(deal, vul=0, dealer=0).score
print(par_result1)
par_result2 = par(table, vul=0, dealer=1).score
print(par_result2)
par_result3 = par(table, vul=0, dealer='A bogus entry').score
print(par_result3)
The text was updated successfully, but these errors were encountered: