Ring Stats: Allow CAP (cn) games to be displayed

This commit is contained in:
Worros 2011-02-15 15:33:18 +08:00
parent 9376f3d8b5
commit 9fe42f66de

View File

@ -623,6 +623,7 @@ class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
lims = [int(x) for x in limits if x.isdigit()] lims = [int(x) for x in limits if x.isdigit()]
potlims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'pl'] potlims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'pl']
nolims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'nl'] nolims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'nl']
capnolims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'cn']
bbtest = "and ( (gt.limitType = 'fl' and gt.bigBlind in " bbtest = "and ( (gt.limitType = 'fl' and gt.bigBlind in "
# and ( (limit and bb in()) or (nolimit and bb in ()) ) # and ( (limit and bb in()) or (nolimit and bb in ()) )
if lims: if lims:
@ -645,6 +646,14 @@ class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
blindtest = str(tuple(nolims)) blindtest = str(tuple(nolims))
blindtest = blindtest.replace("L", "") blindtest = blindtest.replace("L", "")
blindtest = blindtest.replace(",)",")") blindtest = blindtest.replace(",)",")")
bbtest = bbtest + blindtest + ' ) '
else:
bbtest = bbtest + '(-1) ) '
bbtest = bbtest + " or (gt.limitType = 'cn' and gt.bigBlind in "
if capnolims:
blindtest = str(tuple(capnolims))
blindtest = blindtest.replace("L", "")
blindtest = blindtest.replace(",)",")")
bbtest = bbtest + blindtest + ' ) )' bbtest = bbtest + blindtest + ' ) )'
else: else:
bbtest = bbtest + '(-1) ) )' bbtest = bbtest + '(-1) ) )'