This project simulates a turn based game between two players, A and B. Player A goes first and has a chance of winning. If they fail, Player B has a chance of winning. They continue taking turns until one wins. You can move the sliders to see win chances and stuff. Press 0 to set Rounds Played to 1, for betting purposes. Try experimenting with the sliders, you may find some cool stuff! Look in the code to see nerdy math stuff.
Cool mathematical observations: Player B's chance of winning the entire round can't be higher than Player A's chance of winning a turn if Player A's chance of winning a turn is over 50%. If their win chances are the same, Player A has an advantage over Player B as they go first, but as the chances get lower, the advantage Player A has decreases. Inspired by this video from Ted-Ed which you should watch: https://www.youtube.com/watch?v=aa2Fmr7sKIA