Thanks for that further explanation. I think I get it, now, and I agree with your comments about the level of dealer skills involved, particularly as any errors are likely to be catastrophic, especially if not caught straight away!
My last example for your consideration is an extension of the last example in your reply, where this time we have one more player going through to the river (now C + D + E). D bets 50, E calls, C folds. D and E showdown. I’m guessing the money C put into the second side pot stays there?
In my programme, I’m keeping track of each pot created by having values for each of the seats/players plus an ‘orphaned’ amount. Amounts for a player mean two things: 1) this player still has a right to this pot, and 2) how many of the chips the player put in (to check if the betting round is over, or how much more this player needs to put in to call).
Here’s my understanding (in a spreadsheet!) of what things look like before and after C folds.
After C folds, the three pots have the same amount, but C has been stripped out of all three pots, and C’s previous bets have been moved to ‘orphaned’ in each pot.
So, this is the same as your last example, but instead of D winning the second pot by dint of C folding, D wins (maybe) by showdown with E.
I think this all works for me, now. The way I was modelling it seemed a good way to do it for the programme, but may have confused me a bit 🙂
Thanks, again.
John