Hand.py: Use sum(x) instead of reduce(operator.add, x, 0).
This commit is contained in:
parent
00f98f0e12
commit
1227c5df74
|
@ -490,7 +490,7 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio
|
||||||
amount = amount.replace(u',', u'') #some sites have commas
|
amount = amount.replace(u',', u'') #some sites have commas
|
||||||
Ai = Decimal(amount)
|
Ai = Decimal(amount)
|
||||||
Bp = self.lastBet[street]
|
Bp = self.lastBet[street]
|
||||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
Bc = sum(self.bets[street][player])
|
||||||
C = Bp - Bc
|
C = Bp - Bc
|
||||||
if Ai <= C:
|
if Ai <= C:
|
||||||
self.addCall(street, player, amount)
|
self.addCall(street, player, amount)
|
||||||
|
@ -587,7 +587,7 @@ Add a raise by amountBy on [street] by [player]
|
||||||
self.checkPlayerExists(player)
|
self.checkPlayerExists(player)
|
||||||
Rb = Decimal(amountBy)
|
Rb = Decimal(amountBy)
|
||||||
Bp = self.lastBet[street]
|
Bp = self.lastBet[street]
|
||||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
Bc = sum(self.bets[street][player])
|
||||||
C = Bp - Bc
|
C = Bp - Bc
|
||||||
Rt = Bp + Rb
|
Rt = Bp + Rb
|
||||||
|
|
||||||
|
@ -604,7 +604,7 @@ For sites which by "raises x" mean "calls and raises putting a total of x in the
|
||||||
amount = amount.replace(u',', u'') #some sites have commas
|
amount = amount.replace(u',', u'') #some sites have commas
|
||||||
CRb = Decimal(amount)
|
CRb = Decimal(amount)
|
||||||
Bp = self.lastBet[street]
|
Bp = self.lastBet[street]
|
||||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
Bc = sum(self.bets[street][player])
|
||||||
C = Bp - Bc
|
C = Bp - Bc
|
||||||
Rb = CRb - C
|
Rb = CRb - C
|
||||||
Rt = Bp + Rb
|
Rt = Bp + Rb
|
||||||
|
@ -619,7 +619,7 @@ Add a raise on [street] by [player] to [amountTo]
|
||||||
self.checkPlayerExists(player)
|
self.checkPlayerExists(player)
|
||||||
amountTo = amountTo.replace(u',', u'') #some sites have commas
|
amountTo = amountTo.replace(u',', u'') #some sites have commas
|
||||||
Bp = self.lastBet[street]
|
Bp = self.lastBet[street]
|
||||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
Bc = sum(self.bets[street][player])
|
||||||
Rt = Decimal(amountTo)
|
Rt = Decimal(amountTo)
|
||||||
C = Bp - Bc
|
C = Bp - Bc
|
||||||
Rb = Rt - C - Bc
|
Rb = Rt - C - Bc
|
||||||
|
@ -1380,7 +1380,7 @@ Add a complete on [street] by [player] to [amountTo]
|
||||||
amountTo = amountTo.replace(u',', u'') #some sites have commas
|
amountTo = amountTo.replace(u',', u'') #some sites have commas
|
||||||
self.checkPlayerExists(player)
|
self.checkPlayerExists(player)
|
||||||
Bp = self.lastBet['THIRD']
|
Bp = self.lastBet['THIRD']
|
||||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
Bc = sum(self.bets[street][player])
|
||||||
Rt = Decimal(amountTo)
|
Rt = Decimal(amountTo)
|
||||||
C = Bp - Bc
|
C = Bp - Bc
|
||||||
Rb = Rt - C
|
Rb = Rt - C
|
||||||
|
|
Loading…
Reference in New Issue
Block a user