Initial changes are minor things. Adding bid status in to the player info, some typos, and better names for python variables.
The actual big fix comes from selecting the next player in an auction, previously you could skip players and ask someone to bid again on their current bid, usually causing them to pass.
Previously:
a is winning the bid, B is current player
[a, B, c] (Current player =1)
b passes, we remove b
[a, C] (current player = 1)
We still have people bidding, so we advance the player. The array only has two elements so we loop around making current player 0, meaning A will once again bid on their current bid.
[A*, c] (current player = 0)
Now:
[a, B, c] (Current player = 1)
b passes, we advance the current player
[a, b, C] (current player = 2)
we remove b
[a, c] C (current player = 2)
Then, because the array got smaller, we need to back track one. However, if we looped around, we don;t need to, because every time the 0th player passes, the next one up falls to the 0th slot
[a, C] (current player = 1)
Initial changes are minor things. Adding bid status in to the player info, some typos, and better names for python variables. The actual big fix comes from selecting the next player in an auction, previously you could skip players and ask someone to bid again on their current bid, usually causing them to pass. Previously: a is winning the bid, B is current player [a, B, c] (Current player =1) b passes, we remove b [a, C] (current player = 1) We still have people bidding, so we advance the player. The array only has two elements so we loop around making current player 0, meaning A will once again bid on their current bid. [A*, c] (current player = 0)
Now: [a, B, c] (Current player = 1) b passes, we advance the current player [a, b, C] (current player = 2) we remove b [a, c] C (current player = 2) Then, because the array got smaller, we need to back track one. However, if we looped around, we don;t need to, because every time the 0th player passes, the next one up falls to the 0th slot [a, C] (current player = 1)
And now c can decide to bid or pass properly.