0

I've been struggling to figure out how I can make a simulated race game using 6 players (no graphics). I've been able to program the rolls and display, but can't figure out how to create a betting system starting at $1000. Need odds for each racer. Also I want finish line at 166 points.

So far I have the players (players _ value and the random it's, and rolls, but can't figure out how to get a winner or stop the code we when 166 points is reached

Don't know where to go from here to get a winner or win my bets(by typing the number of the player)

  • 2
    Hi Baldur. This sounds like a algorithm design issue rather than a programming issue - i.e. breaking the problem up into steps. Presumably you have a loop; within that loop you will need to check for a winner or for 166 points and break out of the loop (use the `break` keyword). – Kirk Broadhurst Aug 18 '22 at 00:36
  • I have different random ints for each racer. I set the i range to 166...I'm trying to figure out how I can get the winner. There are 6 separate player values also. So I can see all 6 player rolls continuously for 166 rolls. I just want it to stop when any player reaches 166. – Baldur 2.0 Aug 18 '22 at 00:40

0 Answers0