diff --git a/actions.go b/actions.go index 981a677..b8eeacb 100644 --- a/actions.go +++ b/actions.go @@ -171,6 +171,8 @@ func Deal(g *Game, pn uint, data uint) error { g.communityCards[i] = 0 } + g.pots = []Pot{} + for !g.players[g.dealerNum].Ready { g.dealerNum = (g.dealerNum + 1) % uint(len(g.players)) } diff --git a/player.go b/player.go index e104202..214b31b 100644 --- a/player.go +++ b/player.go @@ -67,7 +67,7 @@ func (p *player) putInChips(amt uint) { func (p *player) returnChips(amt uint) { if p.TotalBet > amt { p.TotalBet -= amt - p.Stack -= amt + p.Stack += amt } else { p.Stack += p.TotalBet p.TotalBet = 0