Skip to content

Commit

Permalink
Added support for KingsClub shortdeck
Browse files Browse the repository at this point in the history
  • Loading branch information
ChazDazzle committed Apr 10, 2023
1 parent 4f8a30e commit c7b7421
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
20 changes: 15 additions & 5 deletions pyfpdb/KingsClubToFpdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class KingsClub(HandHistoryConverter):
'Big O' : ('hold', '5_omaha8'),
'Omaha 5 Card' : ('hold', '5_omahahi'),
'Omaha 6 Card' : ('hold', '6_omahahi'),
'Short Deck Holdem' : ('hold', '6_holdem'),
'Razz' : ('stud','razz'),
'Seven Card Stud' : ('stud','studhi'),
'Seven Card Stud Hi-Lo' : ('stud','studhilo'),
Expand Down Expand Up @@ -123,7 +124,7 @@ class KingsClub(HandHistoryConverter):
re_GameInfo = re.compile(u"""
\#(?P<HID>[0-9]+):\s+
(?P<LIMIT>No\sLimit|Limit|Pot\sLimit)\s
(?P<GAME>Holdem|Razz|Seven\sCard\sStud|Seven\sCard\sStud\sHi\-Lo|Omaha|Omaha\s(5|6)\sCard|Omaha\sHi\-Lo|Badugi|2\-7\sTriple\sDraw|2\-7\sSingle\sDraw|5\sCard\sDraw|Big\sO|2\-7\sRazz|Badacey|Badeucey|A\-5\sTriple\sDraw|A\-5\sSingle\sDraw|2\-7\sDrawmaha|Captain)\s
(?P<GAME>Holdem|Short\sDeck\sHoldem|Razz|Seven\sCard\sStud|Seven\sCard\sStud\sHi\-Lo|Omaha|Omaha\s(5|6)\sCard|Omaha\sHi\-Lo|Badugi|2\-7\sTriple\sDraw|2\-7\sSingle\sDraw|5\sCard\sDraw|Big\sO|2\-7\sRazz|Badacey|Badeucey|A\-5\sTriple\sDraw|A\-5\sSingle\sDraw|2\-7\sDrawmaha|Captain)\s
\-\s(?P<SB>[,.0-9]+)/(?P<BB>[,.0-9]+)
""" % substitutions, re.MULTILINE|re.VERBOSE)

Expand Down Expand Up @@ -469,12 +470,21 @@ def readSTP(self, hand):
def readAntes(self, hand):
log.debug(_("reading antes"))
m = self.re_Antes.finditer(hand.handText)
pnames = set([])
for player in m:
#~ logging.debug("hand.addAnte(%s,%s)" %(player.group('PNAME'), player.group('ANTE')))
hand.addAnte(
player.group('PNAME'),
str(Decimal(self.clearMoneyString(player.group('ANTE')))*100) if hand.tourNo is not None else self.clearMoneyString(player.group('ANTE'))
)
if player.group('PNAME') in pnames and hand.gametype['category'] == '6_holdem':
hand.addBlind(
player.group('PNAME'),
'button blind',
str(Decimal(self.clearMoneyString(player.group('ANTE')))*100) if hand.tourNo is not None else self.clearMoneyString(player.group('ANTE'))
)
else:
hand.addAnte(
player.group('PNAME'),
str(Decimal(self.clearMoneyString(player.group('ANTE')))*100) if hand.tourNo is not None else self.clearMoneyString(player.group('ANTE'))
)
pnames.add(player.group('PNAME'))

def readBringIn(self, hand):
m = self.re_BringIn.search(hand.handText,re.DOTALL)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#6155563: No Limit Short Deck Holdem - 0/0
2023-02-21 10:20:44
Table 'Osaka' Seat 1 is the button
Seat 1: Player0 (813.62)
Seat 3: Player1 (1,969)
Seat 4: Hero (1,209)
Player0: posts ante 5
Player1: posts ante 5
Hero: posts ante 5
Player0: posts ante 5
Dealt to Player0: [X X]
Dealt to Player1: [X X]
Dealt to Hero: [Kd Ad]
Player1 raises to 25
Hero raises to 1,204, and is all in
Player0 calls 808.62, and is all in
Player1 folds
Player0 shows [As Qc]
Hero shows [Kd Ad]
*** BOARD 1 - RIVER *** [Ts 9h 8c 8s] [Jc]
*** BOARD 2 - RIVER *** [Kc 8d 6h Qs] [8h]
*** SUMMARY * **
Seat 1: Player0 (826.62) +13
Seat 3: Player1 (1,939) -30
Seat 4: Hero (1,222) +13
Rake 4
Player0 wins (826.62) from pot
Hero wins (826.62) from pot

0 comments on commit c7b7421

Please sign in to comment.