Create an enum of colors for the dice there are 4 possible


Assignment

INTRODUCTION:Write a program that simulates playing Phase 10 dice. Phase 10 dice is a dice game that has players rolling 10 dice and trying to get a certain combination of dice to fulfill the requirements of the current phase to advance to the next phase. The player with the highest score after all 10 phases wins.

INCLUDE IN YOUR ASSIGNMENT: Annotation is a major part of any program.At the top of each of your C++ programs, you should have at least four lines of documentation:

// Program name: tictactoe.cpp
// Author: Maurice Moss
// Date last updated: 5/26/2016
// Purpose: Play the game of Tic-Tac-Toe

Task: Phase 10 Dice Game

1. In real life, Phase 10 dice can be played from 1 to unlimited players; for this program you should create up to 4 players.

a. Prompt the user for the number of players (2 - 4)

2. Create an enum of colors for the dice. There are 4 possible colors for each dice face orange, red, blue, and green.

3. Create a struct Dice. Each die has a face and a color. There are two types of dice. There is a low dice that has number 1-4 on the side and 2 wild faces. There is also a high dice with numbers 5 - 10 on the side and no wild faces. Each numbered face on both types will also have a color (orange, red, blue, and green).

a. Create 4 low dice for the player to roll.
b. Create 6 high dice for the player to roll.

4. Create a struct Player that will keep track of the score for each player and their current phase.

5. The phases are made up of runs and sets.

a. A set is a group of dice that all have the same number on the face. Wild faces can be used as a substitute.
b. A run is a group of dice in consecutive numerical order.
c. For phase 8 Wild faces can only be used if they are the same color as the other 6 dice.

6. There are 10 phases

a. Players must play the 10 phases in order.
b. Phase 1= 2 sets of 3
c. Phase 2= 1 set of 3 and 1 run of 4
d. Phase 3= 1 set of 4 and 1 run of 4
e. Phase 4= 1 run of 7
f. Phase 5= 1 run of 8
g. Phase 6= 1 run of 9
h. Phase 7= 2 sets of 4
i. Phase 8= 7 of all one color
j. Phase 9= 1 set of 5 and 1 set of 2
k. Phase 10= 1 set of 5 and 1 set of 3

7. Each player rolls one high dice to determine the starting player.

8. Use a random Generator to "roll" the dice (determine the face value and color), the user must press a key to roll.

9. Create an array of 10 dice. On their turn, the player rolls all 10 dice. The player must decide which dice to keep and then make a second roll with any dice not kept. The player can then decide again which dice to keep and which to reroll (including rerolling previously kept dice). They reroll the unsaved dice for the last time. The player can opt to not use their rerolls for the turn, and move to scoring early.

10. At the end of their turn, the player's score is tabulated for that turn and added to their total.

a. Points are scored only for the player's current phase, and only if they complete the phase
b. The score is the face value of all the dice used to complete the phase. Wild faces are worth 0 points.

11. Once all playersfinish, create a winning message announcing the winner.

12. Then ask the user if they would like to play again.

13. You must use at least three functions. Some function examples could be:

Roll dice, check phase(to see if they have completed the current phase), score dice.

14. Display the score/phase (with phase description) of the players between rounds.

15. Amend the end of the game. After the first player finishes, each of the remaining players get one final turn to try and complete their current phase. (Extra Credit).

16. Depict afull score cardon the screen with each players' score for each phase and their total current score. (Extra Credit)

17. Five Phase Bonus - After completing phase 5 if a player has over 220 points they earn 40 bonus points (Extra Credit).

18. First finish bonus - The first player to finish the game adds 40 points to his/her score. Others can earn this bonus if they are already in phase 10, complete it, and did not start ahead of the first player to finish phase 10(Extra Credit).

19. Solitaire Mode - 1 player game that follows all the rules of the regular game, but must keep track of each time the player failed to complete a phase. At the end of the game you subtract 5 points for each failure. You can earn the first finish bonus of 40 points by completing phase 10 on the first try. (Extra Credit)

To submit your assignment:

In IvyLearn, go to the module where this assignment is posted, Submit:

1. The Source code for the lab assignment (*.cpp)
2. Screen shots depicting the program in use.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create an enum of colors for the dice there are 4 possible
Reference No:- TGS02771229

Expected delivery within 24 Hours