IniTDie
correctly, you should have seeded the random number generator.
You are ultimately responsible for creating two programs. These programs
dieTest.cpp
. This test driver should use much of the code developed in class. This program should test the die library by performing the following:
DieT dieA, dieB; ... DoInspectionTest(title, dieA, dieB); DoInspectionTest(title, dieB, dieA); ... void DoInspectionTest(string title, DieT a, dieT b){ cout << title << endl;
Visual Inspection Test Rolling A then B: A B 6 3 4 3 6 1 4 1 2 4 1 1 6 1 4 1 5 3 5 3 Rolling B then A: B A 3 6 3 4 1 6 1 4 4 2 1 1 1 6 1 4 3 5 3 5
Independence Test Rolling A then B 1,000 times. Rolling B then A 1,000 times. one of the following Comparing the results ... They are the same! or Comparing the results ... They differ in 722 places!
Uniform Test A 3 sided die was rolled 1000000 times. The results were: 333414 33.3% 332735 33.3% 333851 33.4%
The game starts when the starting player rolls both dice. Remember, the target score for the first round is 2. If the player rolls two 1's, they'll score the two points. If not, no points will be awarded and the play moves on to the next player.
After 11 rounds, add up the total score of each player. The player with the highest cumulative score wins!
Enter the number of players (1-5) => 2 Enter the number of sides (1-100) => 3 Enter the number of sides (1-100) => 3 2 players are using a d3 and a d3. Targets are from 2 to 6. Round 1, aiming for a target of 2 Player 1 rolls a 2 and a 3 for a score of 5, NO Score! Player 2 rolls a 3 and a 1 for a score of 4, NO Score! Round 2, aiming for a target of 3 Player 1 rolls a 1 and a 1 for a score of 2, NO Score! Player 2 rolls a 1 and a 3 for a score of 4, NO Score! Round 3, aiming for a target of 4 Player 1 rolls a 1 and a 2 for a score of 3, NO Score! Player 2 rolls a 2 and a 3 for a score of 5, NO Score! Round 4, aiming for a target of 5 Player 1 rolls a 1 and a 2 for a score of 3, NO Score! Player 2 rolls a 3 and a 3 for a score of 6, NO Score! Round 5, aiming for a target of 6 Player 1 rolls a 3 and a 3 for a score of 6, Score! Player 2 rolls a 2 and a 3 for a score of 5, NO Score! Player 1 scores 6, winner! Player 2 scores 0