This game involves a player P and a casino C. The casino C offers s slot machines (where s is determined at game day, but no more than 100) one of which offers a 0.6 probability to win and s-1 slots having a 0.47 probability to win. C chooses which slot is the winning slot and may change the winning slot k times (also determined at game day but no more than s/7).
P begins with 500*s tokens. P can do up to 500*s pulls. Before each pull, P choose a single slot and bets from one to three tokens. If P wins, then P's wealth increases by that same number of tokens. If P loses, then P's wealth decreases by that same number of tokens. C is told what P's wealth is after each roll, but not which slot P is using. P is allowed to stop betting at any time.
In a competition between teams X and Y, X will play as P and Y as C for one game. Then they will switch roles in the second game.
I will give you the number of switches k and the number of slots s. C will give an initial assignment of the winning slot. P should be told s but not k. Before each pull, (i) check whether C has switched the choice of the winning slot and perform the switch unless C has used up its budget of k switches; (ii) accept the choice by P of a slot to choose and the amount to bet (provided P has at least that many tokens left); (iii) determine whether P wins or loses based on the winning probability (0.47 for losing slots) and (0.6 for the winning slot); (iv) add the winnings or subtract the losings from P's total wealth (which starts off at 500*s and can never go below 0); and (v) inform C of P's new wealth and when P switches slots (but not which slot P has been on or which one P goes to).
When C switches, P is not told that a switch has happened.
If P's wealth ever reaches 0 or if 500*s pulls are done or if P decides to stop, the game stops. Then calculate the wealth of P. As usual, you will keep track of the time of each player and track the wealth of P graphically.
Here is the architecture from 2021. Here is the architecture from 2022. In case there are slight changes to the rules, so please re-read these instructions when you look at the code.