### Having trouble with my Dice Game Program

Hello. I have been designing a dice game program that calls for a playet to roll seven dice, each of which results in a value 1 through 6.
The scoring should be that:
-A triple (any 3 or more dice with identical values) scores 100 times the face value
except for three ones which score as 1,000 points.

-If two triples are scored, the score will be 150 times the face value of each,
except for three ones which score as 900 points.

then if no triple is rolled, then each “1" scores 100 points and/or each "5" scores 50 points.

-The game ends when one player scores 10,000 or more points. However, all players should
be able to complete the last turn, and therefore more than one player could score over 10,000 points. The player with the highest score wins. If more than one player matches high
score, it is a tie.

This is what i came up with Im not sure how to apply the scoring method at the end of seven runs. Your input is greatly appreciated

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124`` ``````#include #include #include using namespace std; int dice1, dice2 = 0; void RollDice(); // The Void Program That Rolls The Dice int main() { srand(time(0)); int input = 1; do { if (input == 1) { system ("Pause"); RollDice(); // Function That Does Everything For The Code cout << " Press 1 to Roll and 2 to Quit :"; } else if (input !=1 || input != 2) { cout << "Input Again:"<> input; } while(input!=2); return 1; } void RollDice() { dice1 = (rand()%6+1); // 1-6 Numbers dice2 = (rand()%6+1); // To Make It Different It Multiplies By 13 switch(dice1) //Switch Statement That Has All The Possible Outcomes For Dice 1 { case 1: cout <<"player 1"<

I also got some help with the case statements but I dont know how it should replace the lengthy on that i have so far:

 ``1234567891011121314151617181920212223242526272829303132`` ``````int counter = 1; int dice1; while(counter <= 2) { switch(dice1) //Switch Statement That Has All The Possible Outcomes For Dice 1 { case 1: cout <<"player "<< counter << endl << endl << "[ . ] " << endl; break; case 2: cout <<"player "<< counter << endl << endl << "[ : ] " << endl; break; case 3: cout <<"player "<< counter << endl << endl << "[. :] " << endl; break; case 4: cout <<"player "<< counter << endl << endl << "[: :] " << endl; break; case 5: cout <<"player "<< counter << endl << endl << "[:.:] " << endl; break; case 6: cout <<"player "<< counter << endl << endl << "[:::] " << endl; break; system ("Pause"); return 0; }``````
Last edited on
Topic archived. No new replies allowed.