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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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