[NEWIMPORT] Fix HandsPlayers.cardX init
This commit is contained in:
parent
943e188a4d
commit
34e7fb0459
|
@ -1389,6 +1389,9 @@ class Database:
|
||||||
pdata[p]['card2'],
|
pdata[p]['card2'],
|
||||||
pdata[p]['card3'],
|
pdata[p]['card3'],
|
||||||
pdata[p]['card4'],
|
pdata[p]['card4'],
|
||||||
|
pdata[p]['card5'],
|
||||||
|
pdata[p]['card6'],
|
||||||
|
pdata[p]['card7'],
|
||||||
pdata[p]['winnings'],
|
pdata[p]['winnings'],
|
||||||
pdata[p]['street0VPI'],
|
pdata[p]['street0VPI'],
|
||||||
pdata[p]['street1Seen'],
|
pdata[p]['street1Seen'],
|
||||||
|
@ -1411,6 +1414,9 @@ class Database:
|
||||||
card2,
|
card2,
|
||||||
card3,
|
card3,
|
||||||
card4,
|
card4,
|
||||||
|
card5,
|
||||||
|
card6,
|
||||||
|
card7,
|
||||||
winnings,
|
winnings,
|
||||||
street0VPI,
|
street0VPI,
|
||||||
street1Seen,
|
street1Seen,
|
||||||
|
@ -1424,7 +1430,8 @@ class Database:
|
||||||
street4Aggr
|
street4Aggr
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
%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, %s
|
%s, %s, %s, %s, %s
|
||||||
|
@ -1432,9 +1439,6 @@ class Database:
|
||||||
|
|
||||||
# position,
|
# position,
|
||||||
# tourneyTypeId,
|
# tourneyTypeId,
|
||||||
# card5,
|
|
||||||
# card6,
|
|
||||||
# card7,
|
|
||||||
# startCards,
|
# startCards,
|
||||||
# rake,
|
# rake,
|
||||||
# totalProfit,
|
# totalProfit,
|
||||||
|
|
|
@ -117,8 +117,10 @@ class DerivedStats():
|
||||||
self.aggr(self.hand, i)
|
self.aggr(self.hand, i)
|
||||||
|
|
||||||
default_holecards = ["Xx", "Xx", "Xx", "Xx"]
|
default_holecards = ["Xx", "Xx", "Xx", "Xx"]
|
||||||
|
|
||||||
for street in hand.holeStreets:
|
for street in hand.holeStreets:
|
||||||
for player in hand.players:
|
for player in hand.players:
|
||||||
|
for i in range(1,8): self.handsplayers[player[1]]['card%d' % i] = 0
|
||||||
if player[1] in hand.holecards[street].keys():
|
if player[1] in hand.holecards[street].keys():
|
||||||
self.handsplayers[player[1]]['card1'] = Card.encodeCard(hand.holecards[street][player[1]][1][0])
|
self.handsplayers[player[1]]['card1'] = Card.encodeCard(hand.holecards[street][player[1]][1][0])
|
||||||
self.handsplayers[player[1]]['card2'] = Card.encodeCard(hand.holecards[street][player[1]][1][1])
|
self.handsplayers[player[1]]['card2'] = Card.encodeCard(hand.holecards[street][player[1]][1][1])
|
||||||
|
@ -126,16 +128,8 @@ class DerivedStats():
|
||||||
self.handsplayers[player[1]]['card3'] = Card.encodeCard(hand.holecards[street][player[1]][1][2])
|
self.handsplayers[player[1]]['card3'] = Card.encodeCard(hand.holecards[street][player[1]][1][2])
|
||||||
self.handsplayers[player[1]]['card4'] = Card.encodeCard(hand.holecards[street][player[1]][1][3])
|
self.handsplayers[player[1]]['card4'] = Card.encodeCard(hand.holecards[street][player[1]][1][3])
|
||||||
except IndexError:
|
except IndexError:
|
||||||
self.handsplayers[player[1]]['card3'] = 0
|
# Just means no player cards for that street/game - continue
|
||||||
self.handsplayers[player[1]]['card4'] = 0
|
pass
|
||||||
#print "DEBUG: hand.holecards[%s][%s][0]: %s" % (street, player[1], hand.holecards[street][player[1]][1])
|
|
||||||
else:
|
|
||||||
#print "DEBUG: player doesn't exist, setting card1-4 to 0"
|
|
||||||
self.handsplayers[player[1]]['card1'] = 0
|
|
||||||
self.handsplayers[player[1]]['card2'] = 0
|
|
||||||
self.handsplayers[player[1]]['card3'] = 0
|
|
||||||
self.handsplayers[player[1]]['card4'] = 0
|
|
||||||
|
|
||||||
|
|
||||||
def assembleHudCache(self, hand):
|
def assembleHudCache(self, hand):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user