My teacher was really opaque on the directions for this lab. So, I rewrote the directions in the way I understand them, and am hoping anyone in the online community will help me.
/*
Directions: We are developing a multi-player game; Each player gets n chances--and n is defined by 11; each turn (or chance) the player tosses a coin; if he rolls a head, he gets to roll the dice; if he rolls a tail, he forfeits the chance and earns a zero.
write a function called myGame to implement this game.
input arguments: n = number of chances
output/return arguments: total = from summation of dice rolls.
Now call your function for 2-players.
Calculate player 1's total
Calculate player 2's total
The highest score wins. Display a message to the winner.
*/
//The basic setup looks like this:
#include <iostream>
#include <cmath>
#include <ctime>
usingnamespace std;
int myRandNumGen(){
int num = rand();
num => 6
return num;
}
int diceRoll(){
int dice = myRandNumGen() % 6 +1;
}
char coinTossFunction( ){
}
double calcAverageDice(int n){
10 = number of dice rolls
}
double calcAverageCoin(int n){
}
return 0;
}