Infinite running loop problems
Hi, I was trying to do my assignment. And at one point, I dont know what I did so that when I execute my program, it runs into an infinite loop. Please help.
here is the details of the assignment
Players: 2 - 6
Equipment: Five 4-sided dice and a supply of poker chips
Object: Be the first to accumulate 30 chips or roll all five dice at once without rolling a 1.
Setup: There is a holding area called the Pot which is initially empty. There is an unlimited supply of chips that come from the Bank. All players start with no chips.
Play: Play begins with a random player. On each turn, one chip from the Bank is added to the Pot. When your turn begins, you roll one die. If you roll a "1" you are "aced out" and your turn is over.
If you do not roll a "1", you may either collect the Pot and end your turn or you may roll again. If you roll, two chips are added to the Pot and you roll two dice. If you roll a "1" on either die, you are "aced out". If you don't roll any 1's, you can either take the pot or keep going with three dice and adding three chips to the Pot.
The process continues, using one more die and adding one more chip each time you repeat. Whether you ace out or pass, the next player always starts again at one die. Anything left in the Pot remains for the next player to shoot for.
Winning: If you make it all the way to 5 dice and still don't ace out, you win the game. Otherwise, the winner is the first player to collect 30 chips.
Implement a Bogart game in Java. Use good object oriented design and use classes as appropriate.
The program should be interactive, and allow number of players to be selected before play begins.
Each roll should report the size of the Pot and the numbers that come up on the dice.
When a turn ends, report the number of chips that player currently has.
At the end of the game, report which player wins and how many chips each player has.
You can write either a console or GUI based program.