Create an enum of colors for the dice

Assignment Help Computer Engineering
Reference no: EM131976760

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.

Reference no: EM131976760

Questions Cloud

Briefly describe the product you would produce and sell : Briefly describe the product you would produce and sell. What market will you target this product for? At what price would you sell your product?
Explain the types of budget approaches : What types of budget approaches are typically used in for-profit companies as opposed to non-profit organizations? Explain at least two different budget methods
What is the minimum price rachel : What is the minimum price Rachel would need to receive for her car?
Standard deviation of the minimum variance portfolio : What are the expected return and standard deviation of the minimum variance portfolio?
Create an enum of colors for the dice : Create an enum of colors for the dice. There are 4 possible colors for each dice face orange, red, blue, and green. Prompt the user for the number of players.
Explain the types of direct and overhead variances : Additionally, explain the types of direct and overhead variances each of your selected organizations might encounter. Provide an example of each.
Why education should be a priority in the developing world : Outline the most significant obstacles to obtaining an education in developing countries. Suggest at least two (2) reasons why education should be a priority.
How would you modify the release to compensate : What is one public response to Apple's news that you would anticipate? Do you think that your classmate successfully mitigated this response?
Develop an sap workflow design for the processes : BCO5501 Business Process Engineering - BPMN & SAP Workflow Design - Develop a model for the processes outlined in the Case Study using BPMN

Reviews

Write a Review

Computer Engineering Questions & Answers

  Find production rules in extended backus-naur form

Give production rules in extended Backus-Naur form that generate a sandwich if a sandwich consists of a lower slice of bread; mustard or mayonnaise.

  How to make the changes permanent

Write down and execute two INSERT statements to insert rows into the ZIPCODE table for the following two cities of your choice. After your INSERT statements are successful, make the changes permanent.

  As a software engineer youve been asked to write a paper

as a software engineer you have been asked to write a paper that describes the use of current technologies with regard

  Compute the phase shift of the resulting shifted sinusoid

Starting with the plot in Fig., sketch a plot of x(t - t1) when t1 = 0.0075. Repeat for t1 = -0.01. Make sure that you shift in the correct direction.

  Determine the scope of a variable declared in for statement

Write test programs in C++, Java, and C# to determine the scope of a variable declared in a for statement. Specifically, the code must determine whether such a variable is visible after the body of the for statement

  Convert the hexadecimal numbers to binary

Convert the following hexadecimal numbers to binary, then add them togather (assume you have an 8 bit processor that uses 2' compliment representation). : -

  Write a function that takes as input a start time

Write a function that takes as input a start time and an end time represented as an int, using military notation.

  Draw a data model for the entities and considering entities

Draw a data model for the following entities, considering the entities as representing a system for a patient billing system and including only the attributes that would be appropriate for this context.

  You are the new chief information officer for acme widgets

you are the new chief information officer for acme widgets. the president of the company recently asked you what you

  Describe an algorithm that compute the given expression

Describe an algorithm using odd. multiply, and data-routing operations to compute the expression s =A1 x8, A2 82 f A32 x 832 with minimum time.

  Analyze how a variable called employee is an abstraction

Variables in programs are also used as abstractions in the problem domain. Analyze how a variable called employee is an abstraction of a problem-domain concept.

  The open systems interconnect osi model is a conceptual

the open systems interconnect osi model is a conceptual model that characterizes and standardizes the internal

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd