Menu

[Solved] Write Java Program Implements Game Computer Plays Human Game Chance Rules Players Start Sc Q37244149

Write java programthat implements a game in which the computer plays against thehuman.

GAME OF CHANCERULES:

  1. Both players start with a score of 0.
  2. The game lasts at most 10 rounds.
  3. During each round, each player throws a fair virtual die.
  4. The player who threw the higher number gains the sum of pointsthrown by both players during that round.
    • Example: If computer throws ‘5’ and human throws ‘3’, computergains 8 points.
  5. If both players throw the same number, both lose the sum ofpoints thrown that round.
    • Example: If computer throws ‘5’ and human also throws ‘5’, theyeach lose 10 points.
  6. If one of the player has a negative number of points, the gameends.
  7. If at any point after the third round one of the players hasmore than 5 times as many points as the other, the game ends.

Expert Answer


Answer to Write java program that implements a game in which the computer plays against the human. GAME OF CHANCE RULES: Both play… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *