Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92814413

Have any Question?


Related Questions in Computer Engineering

Social networking sites such as myspace and facebook pose

Social networking sites such as MySpace and Facebook pose interesting new questions for privacy protection. Describe how privacy may be threatened by the use of these sites. Are these problems significant? How should pri ...

Discuss why a financial services organization would benefit

Discuss why a financial services organization would benefit from using one framework over another (COSO, COBIT,) -- choose a framework or frameworks that in your opinion would be most ideally suited for such an organizat ...

Identify and evaluate at least three considerations that

Identify and evaluate at least three considerations that one must plan for when designing a database. Suggest at least two types of databases that would be useful for small businesses, two types for regional level organi ...

The police lieutenant in charge of the traffic division

The police lieutenant in charge of the traffic division reviews the number of traffic citations issued by each of the police officers in his division. He finds that the mean number of citations written by each officer is ...

A small factory produces two types of toys trucks and

A small factory produces two types of toys: trucks and bicycles. In the manufacturing process two machines are used: the piece maker and the assembler. It takes 2 hours to make the pieces of the bicycles and 1 hour for t ...

In c languageread a double number as 2 digits after the

In C language: Read a double number as 2 digits after the decimal point. The number should have at least 6 digits BEFORE the decimal point. Extract all digits at even positions. Print them in reverse order. Extract all d ...

Why would a policy of re-importation of prescription drugs

Why would a policy of re-importation of prescription drugs be ineffective?

Question physical security provides various forms of

Question: Physical security provides various forms of deterrents. Using proper APA formatting write 4-6 pages, not including your title or reference pages addressing the following. 1. What are some of the physical barrie ...

Suppose that the government is coming up with an employment

Suppose that the government is coming up with an employment protection policy that requires firms to pay each laid-off worker two more months of salary after they are laid off. This essentially changes the variable adjus ...

Question 1two variables have a negative non-linear

Question 1 Two variables have a negative non-linear correlation. Does the dependent variable increase or decrease as the independent variable increases? A)Dependent variable would remain the same B)Dependent variable inc ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As