Question
can someone help me fix me Jeopardy dice game this is what I have now #include #include using namespace std; int rollDie() { return (rand()
can someone help me fix me Jeopardy dice game
this is what I have now
#include
int rollDie() { return (rand() % 6+1); }
void askYoNs(){ cout<<"Do you want to roll a dice (Y/N)?:"< void printScores(int turnTotal,int humanTotal,int compTotal){ int player; int human; if(player==human){ cout<<"Your turn total is "< if (turnTotal==0){ cout<<"Welcome to Jeopardy Dice!"< ///check who is winner if(humanTotal>=80){ cout<<"Congratulations! human won this round of Jeopardy Dice!"< this is what I am trying to get it to return Welcome to Jeopardy Dice! It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 2 Your turn total is 0 computer: 0 human: 0 It is now computer's turn Computer rolled a 6 Computer turn total is 6 Computer rolled a 5 Computer turn total is 0 computer: 0 human: 0 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 5 Your turn total is 0 computer: 0 human: 0 It is now computer's turn Computer rolled a 5 Computer turn total is 0 computer: 0 human: 0 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 5 Your turn total is 0 computer: 0 human: 0 It is now computer's turn Computer rolled a 2 Computer turn total is 0 computer: 0 human: 0 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 3 Your turn total is 3 Do you want to roll again (Y/N)?: You rolled a 6 Your turn total is 9 Do you want to roll again (Y/N)?: computer: 0 human: 9 It is now computer's turn Computer rolled a 5 Computer turn total is 0 computer: 0 human: 9 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 4 Your turn total is 15 computer: 0 human: 24 It is now computer's turn Computer rolled a 2 Computer turn total is 0 computer: 0 human: 24 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 2 Your turn total is 0 computer: 0 human: 24 It is now computer's turn Computer rolled a 2 Computer turn total is 0 computer: 0 human: 24 It is now human's turn Do you want to roll a dice (Y/N)?: computer: 0 human: 24 It is now computer's turn Computer rolled a 5 Computer turn total is 0 computer: 0 human: 24 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 3 Your turn total is 3 Do you want to roll again (Y/N)?: You rolled a 2 Your turn total is 0 computer: 0 human: 24 It is now computer's turn Computer rolled a 1 Computer turn total is 1 Computer rolled a 3 Computer turn total is 4 Computer rolled a 4 Computer turn total is 15 computer: 15 human: 24 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 4 Your turn total is 15 computer: 15 human: 39 It is now computer's turn Computer rolled a 1 Computer turn total is 1 Computer rolled a 1 Computer turn total is 2 Computer rolled a 5 Computer turn total is 0 computer: 15 human: 39 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 2 Your turn total is 0 computer: 15 human: 39 It is now computer's turn Computer rolled a 5 Computer turn total is 0 computer: 15 human: 39 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 6 Your turn total is 6 Do you want to roll again (Y/N)?: computer: 15 human: 45 It is now computer's turn Computer rolled a 5 Computer turn total is 0 computer: 15 human: 45 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 4 Your turn total is 15 computer: 15 human: 60 It is now computer's turn Computer rolled a 6 Computer turn total is 6 Computer rolled a 2 Computer turn total is 0 computer: 15 human: 60 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 4 Your turn total is 15 computer: 15 human: 75 It is now computer's turn Computer rolled a 5 Computer turn total is 0 computer: 15 human: 75 It is now human's turn Do you want to roll a dice (Y/N)?: You rolled a 4 Your turn total is 15 computer: 15 human: 90 Congratulations! human won this round of Jeopardy Dice!
Step 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