Question: I missed a few classes for my C++ class and I'm not sure where to go with this homework. I'd love some help getting some
I missed a few classes for my C++ class and I'm not sure where to go with this homework. I'd love some help getting some code down. I don't understand the vectors and random numbers parts. I understand loops for the most part. This is all coded in C++ and specifically using if statements, loops, random numbers and vectors.
Yahtzee:
Implement a portion of the classic Yahtzee game using random numbers.
Key programming concepts: loops, vectors code template)
Approzimate lines of 48 (does not include comments, white space, or any of the Yahtzee Rules: http://www. has bro. com/common/ instruct/ Yahtzee. pdf
Program Inputs
Choose seed for Yahtzee simulation: The user will always enter a positive whole number; no error checking needed
Select dice to keep: The user will always either y or n separated by a space for all 5 dice
Program Outputs
Roll XXX (YYY new dice): zzz.
Replace XXX with the roll number, YYY with how many dice were rolled, and ZZZ with the dice values
Full house: XXX
Replace XXX with 25 or 0 points
Yahtzee: XXX
Replace XXX with 50 or 0 points
Chance: XXX
Replace XXX with the sum of all dice
Assignment details:
Create a new program that allows the user to play one turn or Yahtzee and calculates the different yahtzee scores for his/her chosen five dice. The Yahtzee point system has several scoring options, but we are only interested in calculating points for a Full House, Yahtzee, and Chance. The various scoring options are as follows:
Full House--3 of a kind and a pair--25 points
Yahtzee--Five of a kind--50 points
Chance--Any five dice--Sum of the Dice
First, present the user with the chance to choose their seed for the random number engine. Per the Yahtzee rules, the user will get three rolls rolling 5 dice. After the first and second roll allow the user to choose which dice to keep (not roll again!) using y for yes and n for no. These will be placed directly under the dice for easier reading. After the third roll, calculatethe score for full house, yahtzee, and chance.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
