Question: can someone help me fix this #include #include using namespace std; int player; int human=0; int rollDie() { return (rand() % 6+1); } void askYoNs()

can someone help me fix this

#include #include using namespace std; int player; int human=0; 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) { if(player==human) { cout<<"Your turn total is "<

int changePlayer(int player) { if(player==human) return 1; return human; } int process(int& turnTotal,int roll,int curr_player,int& humanTotal,int& computerTotal) { if(roll==2 || roll==5) { curr_player=changePlayer(curr_player); turnTotal=0; printScores(turnTotal,humanTotal,computerTotal); } else if(roll==4) { turnTotal=15; ///switch player if(curr_player==human) humanTotal+=turnTotal; else computerTotal+=turnTotal; curr_player=changePlayer(curr_player); turnTotal=0; printScores(turnTotal,humanTotal,computerTotal); } else { ///roll = 1 3 6 turnTotal+=roll; cout<<"Your turn total is "<=10 ///then switch player if(curr_player!=human && turnTotal >=10 ) { computerTotal+=turnTotal; curr_player=changePlayer(curr_player); turnTotal=0; printScores(turnTotal,humanTotal,computerTotal); } return curr_player; } void game() { int player=human; int humanTotal=0; int computerTotal=0; int turnTotal=0; if (turnTotal==0){ cout<<"Welcome to Jeopardy Dice!"<>YoN; if(YoN=='Y') { roll=rollDie(); cout<<"You rolled a "<=80){ cout<<"Congratulations! human won this round of Jeopardy Dice!"<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!