Assuming you don't have infinite money, and that there are limits at the table, this is a good example of a non-ergotic system, where the mean and the median diverge. Because the rules of the game you defined dictate that at some point, you run out of money and have to stop playing, the outcomes for the median dip below that of the lucky few, who win more than lose owing to random chance. This is a super cool concept in a lot of systems, not just gambling fwiw
Check out https://medium.com/incerto/the-logic-of-risk-taking-107bf41029d3 or https://taylorpearson.me/ergodicity/
That's actually pretty great dancing ngl
I'm a software developer by the way, so writing code is not a problem. But is it even necessary to write code?
Clearly an experienced software developer