I am writing an online poker game software in which I want to conduct tournaments.
In tournaments sometimes players remain to "sit out" throughout the tournament. There is 1 case that's happening that I want to discuss.
First of all, If a player is sitting out in a hand then usually I fold his hand if he is not Big Blind or All In.
Suppose there are 5 players on a table with the following chips distributions:
p1(Dealer): 14812 [Not Sitting out]
p2(SmallBlind): 426 [Sitting out]
p3(BigBlind): 2 [Sitting out]
p4: 4597[Sitting out]
p5: 5475[Sitting out]
Blinds are 125/250 Ante is 25.
When hand starts I first take the ante from the players, In this scenario, since p3 has not enough amount to meet the ante I will take his 2 chips with the rest of the players and create a side pot of 10 in which (p1, p2, p3, p4, p5) are there
Then I took the remaining 23 of ante from the remaining 4 players [p1, p2, p4, p5] and create another pot of 92 in which [p1, p2, p4, p5] is there
Since p2 is Small Blind I will take 125 from him and add to second pot
So now we have the following pot Structure:
Pot#1: 10 [p1, p2, p3, p4, p5]
Pot#2: 217[p1, p2, p4, p5]
After this betting round begins:
p4 is sitting out so FOLD
p5 is sitting out so FOLD
p1 is not sitting out but "times out" SO FOLD
p2 is not sitting out so FOLD
Now whenever a player folds or times out he gets removed from the pot of which he is part of
So after the betting round, we have the following pot distributions:
Pot#2: 217[No player as all player folded or timedout]
So when the hand ends Pot#1 goes to p3
but Pot#2 doesn't resolve which leads to fewer chips when the tournament ends
My question is how I should deal with this scenario and in particular when players are sitting out what should be their responses in tournaments