Question
The objective is to create a Jeopardy Dice game in which one player (the user) competes against the computer to reach 80 points in c++.
The objective is to create a Jeopardy Dice game in which one player (the user) competes against the computer to reach 80 points in c++.
Game Mechanics
There are two players: the user and the computer, who alternate turns until one of them reaches 80 points or higher.
The user is always the first player and starts the game.
If either player reaches 80 points or more at the end of their turn, the game ends immediately and the other player does not get another turn.
During one turn the player (either the user or computer) accumulates a total number of points equal to turnTotal by repeatedly rolling a single fair 6-sided die. 1. At the beginning of the players turn, turnTotal starts at 0. 2. If they roll a 2 or 5, their turn ends and the turnTotal is equal to 0. 3. If they roll a 4, their turn ends and turnTotal is equal to 15 (irrespective what they collected up to that roll) 4. If they roll a 1, 3, or 6, turnTotal increases by the amount on the die and the player rolls again The value on the die is selected randomly during every roll
At the end of the turn, a players total score, playerTotal (either user or computer based on the turn), is increased by turnTotal.
During a players turn, before each roll, they are given two options: 1. Continue rolling 2. Hold; if the user chooses to Hold the users turn ends, turnTotal is added to playerTotal, and the turn is passed to the computer.
If the player is the computer, they will always continue rolling until their turnTotal reaches the value 10 or higher, at which point the computer player will end its turn and play passes to the user.
Your solution must have an algorithm in pseudocode explaining how you are approaching the problem, step by step.
Your main() function will have just one statement: a call to the function game(). Do not modify main().
game() function is the driver function of your program and we will be testing your game() function. 1. The function does not take any input parameters. 2. The function does not return any value.
Your solution should have at least 3 functions besides the game() and rollDie() functions. Since the functions you will create will be called from inside the game() function, their definition should be above the definition of game().
You must have a minimum of 3 functions of your choice.
Out of the three functions (or more) you will create 1. one of the functions must have at least 1 input parameter, 2. one of the functions must return a value, and 3. one of the functions should not return anything, but it should print/display something.
//Put your pseudocode for the entire game here (see template in jeopardyDice.cpp) #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started