Added the column 'showed' to handsplayers which flags whether or not a player showed his or her hand. If false and 'sawSD' is true then they mucked. If true and 'sawSD' is false, then they showed outside of a showdown (site dependent). Also fixed up readShownCards in FTP's hhc so it recorded mucked and showed correctly.
This commit is contained in:
parent
5f9d402701
commit
d7ed15bcfe
|
@ -73,7 +73,7 @@ except ImportError:
|
||||||
use_numpy = False
|
use_numpy = False
|
||||||
|
|
||||||
|
|
||||||
DB_VERSION = 154
|
DB_VERSION = 155
|
||||||
|
|
||||||
|
|
||||||
# Variance created as sqlite has a bunch of undefined aggregate functions.
|
# Variance created as sqlite has a bunch of undefined aggregate functions.
|
||||||
|
@ -1963,6 +1963,7 @@ class Database:
|
||||||
pdata[p]['street3Seen'],
|
pdata[p]['street3Seen'],
|
||||||
pdata[p]['street4Seen'],
|
pdata[p]['street4Seen'],
|
||||||
pdata[p]['sawShowdown'],
|
pdata[p]['sawShowdown'],
|
||||||
|
pdata[p]['showed'],
|
||||||
pdata[p]['wonAtSD'],
|
pdata[p]['wonAtSD'],
|
||||||
pdata[p]['street0Aggr'],
|
pdata[p]['street0Aggr'],
|
||||||
pdata[p]['street1Aggr'],
|
pdata[p]['street1Aggr'],
|
||||||
|
|
|
@ -43,6 +43,7 @@ class DerivedStats():
|
||||||
init['street4Aggr'] = False
|
init['street4Aggr'] = False
|
||||||
init['wonWhenSeenStreet1'] = 0.0
|
init['wonWhenSeenStreet1'] = 0.0
|
||||||
init['sawShowdown'] = False
|
init['sawShowdown'] = False
|
||||||
|
init['showed'] = False
|
||||||
init['wonAtSD'] = 0.0
|
init['wonAtSD'] = 0.0
|
||||||
init['startCards'] = 0
|
init['startCards'] = 0
|
||||||
init['position'] = 2
|
init['position'] = 2
|
||||||
|
@ -187,6 +188,8 @@ class DerivedStats():
|
||||||
self.handsplayers[player[1]]['tourneysPlayersIds'] = hand.tourneysPlayersIds[player[1]]
|
self.handsplayers[player[1]]['tourneysPlayersIds'] = hand.tourneysPlayersIds[player[1]]
|
||||||
else:
|
else:
|
||||||
self.handsplayers[player[1]]['tourneysPlayersIds'] = None
|
self.handsplayers[player[1]]['tourneysPlayersIds'] = None
|
||||||
|
if player[1] in hand.shown:
|
||||||
|
self.handsplayers[player[1]]['showed'] = True
|
||||||
|
|
||||||
#### seen now processed in playersAtStreetX()
|
#### seen now processed in playersAtStreetX()
|
||||||
# XXX: enumerate(list, start=x) is python 2.6 syntax; 'start'
|
# XXX: enumerate(list, start=x) is python 2.6 syntax; 'start'
|
||||||
|
|
|
@ -170,7 +170,7 @@ class Fulltilt(HandHistoryConverter):
|
||||||
self.re_ShowdownAction = re.compile(r"^%s shows \[(?P<CARDS>.*)\]" % player_re, re.MULTILINE)
|
self.re_ShowdownAction = re.compile(r"^%s shows \[(?P<CARDS>.*)\]" % player_re, re.MULTILINE)
|
||||||
self.re_CollectPot = re.compile(r"^Seat (?P<SEAT>[0-9]+): %(PLAYERS)s (\(button\) |\(small blind\) |\(big blind\) )?(collected|showed \[.*\] and won) \([%(LS)s]?(?P<POT>[%(NUM)s]+)\)(, mucked| with.*)?" % self.substitutions, re.MULTILINE)
|
self.re_CollectPot = re.compile(r"^Seat (?P<SEAT>[0-9]+): %(PLAYERS)s (\(button\) |\(small blind\) |\(big blind\) )?(collected|showed \[.*\] and won) \([%(LS)s]?(?P<POT>[%(NUM)s]+)\)(, mucked| with.*)?" % self.substitutions, re.MULTILINE)
|
||||||
self.re_SitsOut = re.compile(r"^%s sits out" % player_re, re.MULTILINE)
|
self.re_SitsOut = re.compile(r"^%s sits out" % player_re, re.MULTILINE)
|
||||||
self.re_ShownCards = re.compile(r"^Seat (?P<SEAT>[0-9]+): %s (\(button\) |\(small blind\) |\(big blind\) )?(?P<ACT>showed|mucked) \[(?P<CARDS>.*)\](( and won \(.*\) with | and lost with | \- )(?P<STRING>.*))?" % player_re, re.MULTILINE)
|
self.re_ShownCards = re.compile(r"^Seat (?P<SEAT>[0-9]+): %s (\(button\) |\(small blind\) |\(big blind\) )?(?P<SHOWED>showed|mucked) \[(?P<CARDS>.*)\](( and won \(.*\) with | and lost with | \- )(?P<STRING>.*))?" % player_re, re.MULTILINE)
|
||||||
|
|
||||||
def readSupportedGames(self):
|
def readSupportedGames(self):
|
||||||
return [["ring", "hold", "nl"],
|
return [["ring", "hold", "nl"],
|
||||||
|
@ -525,11 +525,16 @@ class Fulltilt(HandHistoryConverter):
|
||||||
def readShownCards(self,hand):
|
def readShownCards(self,hand):
|
||||||
for m in self.re_ShownCards.finditer(hand.handText):
|
for m in self.re_ShownCards.finditer(hand.handText):
|
||||||
if m.group('CARDS') is not None:
|
if m.group('CARDS') is not None:
|
||||||
|
cards = m.group('CARDS')
|
||||||
|
cards = cards.split(' ') # needs to be a list, not a set--stud needs the order
|
||||||
string = m.group('STRING')
|
string = m.group('STRING')
|
||||||
if m.group('ACT'):
|
|
||||||
hand.addShownCards(cards=m.group('CARDS').split(' '), player=m.group('PNAME'), shown = False, mucked = True, string = string)
|
(shown, mucked) = (False, False)
|
||||||
else:
|
if m.group('SHOWED') == "showed": shown = True
|
||||||
hand.addShownCards(cards=m.group('CARDS').split(' '), player=m.group('PNAME'), shown = True, mucked = False, string = string)
|
elif m.group('SHOWED') == "mucked": mucked = True
|
||||||
|
|
||||||
|
#print "DEBUG: hand.addShownCards(%s, %s, %s, %s)" %(cards, m.group('PNAME'), shown, mucked)
|
||||||
|
hand.addShownCards(cards=cards, player=m.group('PNAME'), shown=shown, mucked=mucked, string=string)
|
||||||
|
|
||||||
def guessMaxSeats(self, hand):
|
def guessMaxSeats(self, hand):
|
||||||
"""Return a guess at max_seats when not specified in HH."""
|
"""Return a guess at max_seats when not specified in HH."""
|
||||||
|
|
|
@ -731,6 +731,7 @@ class Sql:
|
||||||
street3Seen BOOLEAN,
|
street3Seen BOOLEAN,
|
||||||
street4Seen BOOLEAN,
|
street4Seen BOOLEAN,
|
||||||
sawShowdown BOOLEAN,
|
sawShowdown BOOLEAN,
|
||||||
|
showed BOOLEAN,
|
||||||
|
|
||||||
street1Aggr BOOLEAN,
|
street1Aggr BOOLEAN,
|
||||||
street2Aggr BOOLEAN,
|
street2Aggr BOOLEAN,
|
||||||
|
@ -871,6 +872,7 @@ class Sql:
|
||||||
street3Seen BOOLEAN,
|
street3Seen BOOLEAN,
|
||||||
street4Seen BOOLEAN,
|
street4Seen BOOLEAN,
|
||||||
sawShowdown BOOLEAN,
|
sawShowdown BOOLEAN,
|
||||||
|
showed BOOLEAN,
|
||||||
|
|
||||||
street1Aggr BOOLEAN,
|
street1Aggr BOOLEAN,
|
||||||
street2Aggr BOOLEAN,
|
street2Aggr BOOLEAN,
|
||||||
|
@ -1010,6 +1012,7 @@ class Sql:
|
||||||
street3Seen INT,
|
street3Seen INT,
|
||||||
street4Seen INT,
|
street4Seen INT,
|
||||||
sawShowdown INT,
|
sawShowdown INT,
|
||||||
|
showed INT,
|
||||||
|
|
||||||
street1Aggr INT,
|
street1Aggr INT,
|
||||||
street2Aggr INT,
|
street2Aggr INT,
|
||||||
|
@ -4963,6 +4966,7 @@ class Sql:
|
||||||
street3Seen,
|
street3Seen,
|
||||||
street4Seen,
|
street4Seen,
|
||||||
sawShowdown,
|
sawShowdown,
|
||||||
|
showed,
|
||||||
wonAtSD,
|
wonAtSD,
|
||||||
street0Aggr,
|
street0Aggr,
|
||||||
street1Aggr,
|
street1Aggr,
|
||||||
|
@ -5071,7 +5075,7 @@ class Sql:
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s
|
%s, %s, %s
|
||||||
)"""
|
)"""
|
||||||
|
|
||||||
self.query['store_hands_actions'] = """insert into HandsActions (
|
self.query['store_hands_actions'] = """insert into HandsActions (
|
||||||
|
|
|
@ -127,7 +127,7 @@ def compare_handsplayers_file(filename, importer, errors):
|
||||||
# The stats match - continue
|
# The stats match - continue
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if stat == 'tourneyTypeId' or stat == 'tourneysPlayersIds':
|
if stat == 'tourneyTypeId' or stat == 'tourneysPlayersIds' or stat == 'showed':
|
||||||
# Not and error
|
# Not and error
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user