Skip to content

Commit ab4eb3f

Browse files
committed
Fix Pavlicek playing tricks table.
1 parent fbcb36d commit ab4eb3f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

redeal/redeal.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def freakness(self):
460460
"""
461461
The hand's `Pavlicek freakness`__.
462462
463-
__ http://www.rpbridge.net/8j17.htm#8
463+
__ http://www.rpbridge.net/8j17.htm#7
464464
"""
465465
return (sum(max(l - 4, 3 - l) for l in map(len, self))
466466
+ {0: 2, 1: 1}.get(min(map(len, self)), 0))
@@ -511,7 +511,10 @@ def pt(self):
511511
"""
512512
The holding's `Pavlicek playing tricks`__.
513513
514-
__ http://www.rpbridge.net/8j17.htm#3
514+
The following corrections to the table have been made: K and Qx are 0
515+
tricks (not 0.5); Kxx is 0.5 tricks (not 1).
516+
517+
__ http://www.rpbridge.net/8j17.htm#4
515518
"""
516519
len_pt = max(len(self) - 3, 0)
517520
if {A, K, Q} <= self:
@@ -526,7 +529,7 @@ def pt(self):
526529
return 1.5 + len_pt
527530
if {A} <= self or {K, Q} <= self or {K, J} <= self:
528531
return 1 + len_pt
529-
if {K, T} <= self or {Q, J} <= self and len(self) >= 3:
532+
if {Q, J} <= self and len(self) >= 3:
530533
return 1 + len_pt
531534
if ({K} <= self and len(self) >= 2 or
532535
({Q} <= self or {J, T} in self) and len(self) >= 3):

0 commit comments

Comments
 (0)