Question: You will develop a DiceArray class to be used to implement a dice game class. In the game the user competes against the computer by
You will develop a DiceArray class to be used to implement a dice game class. In the game the user
competes against the computer by rolling die and accumulating points based upon the sum of
the dice rolled. The goal is to see who can accumulate more points, the user or the computer.
The game will consist of rounds. In each round both the user and the computer will take a
turn rolling the dice.
The user gets the first turn. They will roll the dice until one of four things happens:
They have rolled three times
They roll double s
They roll triple s
They decide not to roll again
The computer gets its turn. The computer will roll the dice until one of three things happens:
It rolls double s
It rolls triple s
Its total for the turn is or more
If the usercomputer rolls double s the usercomputer loses all points accumulated for that
turn and the turn is over. If the usercomputer rolls triple s the usercomputers total points
accumulated for the game is set back to and the turn is over. The player may choose to end
their turn after any roll or choose to continue rolling and risk losing some or all their points.
The points earned during a single round which could be will be added to their total points,
unless of course they lost all their points by rolling triple s
When the game ends ie the rounds are over your program should determine and display the
game winner or if it was a tie.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
