anntzer/redeal

Playing tricks is different from Richard Pavlicek's table

Closed this issue · 1 comments

In http://www.rpbridge.net/8j17.htm#4 KT(x) is not listed as a special combination, but instead is listed as Kx worth 0.5 tricks and Kxx worth 1 trick (I don't understand why it's not also 0.5).

redeal/redeal/redeal.py

Lines 515 to 534 in 4ad479b

__ http://www.rpbridge.net/8j17.htm#3
"""
len_pt = max(len(self) - 3, 0)
if {A, K, Q} <= self:
return 3 + len_pt
if {A, K, J} <= self or {A, Q, J} <= self:
return 2.5 + len_pt
if {A, K} <= self or {A, Q, T} <= self or {K, Q, J} <= self:
return 2 + len_pt
if {A, Q} <= self or {K, J, T} <= self:
return 1.5 + len_pt
if {A, J} <= self or {K, Q} <= self and len(self) >= 3:
return 1.5 + len_pt
if {A} <= self or {K, Q} <= self or {K, J} <= self:
return 1 + len_pt
if {K, T} <= self or {Q, J} <= self and len(self) >= 3:
return 1 + len_pt
if ({K} <= self and len(self) >= 2 or
({Q} <= self or {J, T} in self) and len(self) >= 3):
return .5 + len_pt

Other differences (that I agree with):

  • Stiff K is 0 tricks instead of 0.5 tricks
  • Qx is 0 tricks instead of 0.5 tricks

BTW the URL fragments are off by 1.

Thanks for noticing that; I agree with the corrections you've made in rektdeal.

I also fixed the URL fragements.