Stars: Fix accounting error in single draw games.

There is no indicator between 'streets' in single draw games on Stars.

Patch adds a new regex for single draw games to detect the draw and divide streets.
This commit is contained in:
Worros 2011-02-16 15:10:48 +08:00
parent 9fe42f66de
commit e387593967

View File

@ -338,6 +338,13 @@ class PokerStars(HandHistoryConverter):
r"(\*\*\* 6th STREET \*\*\*(?P<SIXTH>.+(?=\*\*\* RIVER \*\*\*)|.+))?"
r"(\*\*\* RIVER \*\*\*(?P<SEVENTH>.+))?", hand.handText,re.DOTALL)
elif hand.gametype['base'] in ("draw"):
if hand.gametype['category'] in ('27_1draw', 'fivedraw'):
# There is no marker between deal and draw in Stars single draw games
# This unfortunately affects the accounting.
m = re.search(r"(?P<PREDEAL>.+(?=\*\*\* DEALING HANDS \*\*\*)|.+)"
r"(\*\*\* DEALING HANDS \*\*\*(?P<DEAL>.+(?=(: stands pat on|: discards))|.+))?"
r"((: stands pat on|: discards)(?P<DRAWONE>.+))?", hand.handText,re.DOTALL)
else:
m = re.search(r"(?P<PREDEAL>.+(?=\*\*\* DEALING HANDS \*\*\*)|.+)"
r"(\*\*\* DEALING HANDS \*\*\*(?P<DEAL>.+(?=\*\*\* FIRST DRAW \*\*\*)|.+))?"
r"(\*\*\* FIRST DRAW \*\*\*(?P<DRAWONE>.+(?=\*\*\* SECOND DRAW \*\*\*)|.+))?"