WinamaxToFpdb: store tourney buyins in cents, not dollars.
Abbreviate No Limit Hold'em in table names to NLHE.
This commit is contained in:
parent
635dbc9a11
commit
06d228fbec
|
@ -233,6 +233,11 @@ class Winamax(HandHistoryConverter):
|
||||||
hand.tourNo = info[key]
|
hand.tourNo = info[key]
|
||||||
if key == 'TABLE':
|
if key == 'TABLE':
|
||||||
hand.tablename = info[key]
|
hand.tablename = info[key]
|
||||||
|
# TODO: long-term solution for table naming on Winamax.
|
||||||
|
if hand.tablename.endswith(u'No Limit Hold\'em'):
|
||||||
|
hand.tablename = hand.tablename[:-len(u'No Limit Hold\'em')] + u'NLHE'
|
||||||
|
else:
|
||||||
|
print '%s does not end with NLHE' % hand.tablename
|
||||||
if key == 'MAXPLAYER' and info[key] != None:
|
if key == 'MAXPLAYER' and info[key] != None:
|
||||||
hand.maxseats = int(info[key])
|
hand.maxseats = int(info[key])
|
||||||
|
|
||||||
|
@ -276,15 +281,13 @@ class Winamax(HandHistoryConverter):
|
||||||
hand.isKO = False
|
hand.isKO = False
|
||||||
|
|
||||||
info['BIRAKE'] = info['BIRAKE'].strip(u'$€')
|
info['BIRAKE'] = info['BIRAKE'].strip(u'$€')
|
||||||
rake_factor = 1
|
|
||||||
bi_factor = 1
|
|
||||||
if info['BIAMT'].find(".") == -1:
|
|
||||||
bi_factor = 100
|
|
||||||
if info['BIRAKE'].find(".") == -1:
|
|
||||||
rake_factor = 100
|
|
||||||
|
|
||||||
hand.buyin = bi_factor*info['BIAMT']
|
# TODO: Is this correct? Old code tried to
|
||||||
hand.fee = rake_factor*info['BIRAKE']
|
# conditionally multiply by 100, but we
|
||||||
|
# want hand.buyin in 100ths of
|
||||||
|
# dollars/euros (so hand.buyin = 90 for $0.90 BI).
|
||||||
|
hand.buyin = int(100 * Decimal(info['BIAMT']))
|
||||||
|
hand.fee = int(100 * Decimal(info['BIRAKE']))
|
||||||
else:
|
else:
|
||||||
hand.buyin = int(Decimal(info['BIAMT']))
|
hand.buyin = int(Decimal(info['BIAMT']))
|
||||||
hand.fee = 0
|
hand.fee = 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user