Fix PL in Graph viewer

Grapher still doesn't support the cap games, that code could use some cleanout.
This commit is contained in:
Worros 2009-11-21 11:11:31 +08:00
parent 348420f30d
commit 8d2b315fc8

View File

@ -216,6 +216,7 @@ class GuiGraphViewer (threading.Thread):
#nametest = nametest.replace("L", "") #nametest = nametest.replace("L", "")
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']
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']
limittest = "and ( (gt.limitType = 'fl' and gt.bigBlind in " limittest = "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 ()) )
@ -226,6 +227,14 @@ class GuiGraphViewer (threading.Thread):
limittest = limittest + blindtest + ' ) ' limittest = limittest + blindtest + ' ) '
else: else:
limittest = limittest + '(-1) ) ' limittest = limittest + '(-1) ) '
limittest = limittest + " or (gt.limitType = 'pl' and gt.bigBlind in "
if potlims:
blindtest = str(tuple(potlims))
blindtest = blindtest.replace("L", "")
blindtest = blindtest.replace(",)",")")
limittest = limittest + blindtest + ' ) '
else:
limittest = limittest + '(-1) ) '
limittest = limittest + " or (gt.limitType = 'nl' and gt.bigBlind in " limittest = limittest + " or (gt.limitType = 'nl' and gt.bigBlind in "
if nolims: if nolims:
blindtest = str(tuple(nolims)) blindtest = str(tuple(nolims))
@ -234,6 +243,7 @@ class GuiGraphViewer (threading.Thread):
limittest = limittest + blindtest + ' ) )' limittest = limittest + blindtest + ' ) )'
else: else:
limittest = limittest + '(-1) ) )' limittest = limittest + '(-1) ) )'
if type == 'ring': if type == 'ring':
limittest = limittest + " and gt.type = 'ring' " limittest = limittest + " and gt.type = 'ring' "
elif type == 'tour': elif type == 'tour':