Write a program that simulates playing phase

Assignment Help C/C++ Programming
Reference no: EM132271870

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

ASSIGNMENT: 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 should specify which dice will be used for scoring.
a. If a phase has multiple requirements you should ask the player which dice they want to use for each requirement.
i. Do not allow the player to use the same dice for more than one requirement.
ii. You should check that the dice specified meet the requirement for the phase. That means if they are supposed to create a set of 3, do the dice they chose make a set and are there at least 3 of them.
b. Points are scored only for the player's current phase, and only if they complete the phase
c. The score is the face value of all the dice used to complete the phase. Wild faces are worth 0 points.

11. Once all players finish, 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.

16. Depict a full score card on the screen with each players' score for each phase and their total current score.

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

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.

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.

Verified Expert

Phase 10 dice diversion is an arrangement dice-throwing amusement played with custom Phase 10 dice.The goal of the diversion is to finished 10 stages in a particular succession and score most elevated focuses all the while.It is implemented in c++ as 10 custom Phase 10 dice and a scoresheet. Stage 10 custom bones arrives in a lot of ten six-sided dice. Six of the bones contain numbers from 5 through 10 out of 4 unique hues. Remaining 4 dice contain numbers from 1 through 4 and two wild faces (set apart with W) in 4 unique hues.

Reference no: EM132271870

Questions Cloud

What are the legal systems downfalls : Research international laws combating human trafficking (sex/labor/smuggling/organ trade, etc). What are the legal systems downfalls?
Maintain a position of being neutral third party : Can you help me propose at least two reasons why a mediator should maintain a position of being neutral third party within the mediation process
Compute the minimum maximum and mean location values : INFO411/911 Data Mining Assignment, University of Wollongong, Australia. Compute the minimum, maximum, and mean location values
What role does going to college play in all of this : What would you change in the world if you could? Why? Is it your responsibility to make this change? If so, explain why. If not, then explain who has.
Write a program that simulates playing phase : Create a struct Player that will keep track of the score for each player and their current phase - Create an enum of colors for the dice
Measure the effectiveness of marketing videos : What are some of the key metrics that are used to measure the effectiveness of marketing videos?
What might you see the process entailing maybe from now : Roger Landry (2014) started his book comparing life to autumn. He said "The spectacular colors of the fall foliage are compensation for long winters.
What are the legal implications-record keeping : What are the legal implications/record keeping requirements that were not met by Adam?
What are the challenges as the firm evolves through each : Describe and rationalize how a firm's logistics and supply chain strategy will likely evolve as a firm shifts from no international to a global strategy

Reviews

len2271870

4/1/2019 3:25:00 AM

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.

Write a Review

C/C++ Programming Questions & Answers

  Create an int variable and assign it a value

create an int variable and assign it a value. Print the int variable as a int and as a char.

  What are forms a c-style string can take in a cpp program

What are the three forms a C-style string can take in a C++ program? Write a function that has this prototype: int replace (char * str, char c1, char c2);

  Write cpp program in order to capture social security number

Write a C++ program in order to capture and store fifty (50) social security numbers within a C++ program. Determine whether you would use a struct or an array to store the social security numbers for processing in the program.

  Program for atm machine using linked list

Write a c++ program for atm machine using linked list as data structures?

  Program that translates a letter grade into a number grade

Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D, and F, possibly followed by + or -.

  The access attributes, list and describe

Without considering the access attributes, list and describe which base class members may not be inherited by a derived class and provide a rationale for why this is?

  Implement the value iteration algorithm for mdp

Implement the value iteration algorithm for MDP which computes the solution to the situation shown below. You may write your code in either C or C++. Your code must be implemented as a self-contained single source code file which does not require..

  Programming with control structures

Develop a Python program which will calculate the sum of an integer series, as described below. The program wil repeatedly prompt he user to enter a command (a character string).

  Create a small database with a table or two

Use Microsoft access to create a small database with a table or two. Remember that your Microsoft Access is most likely a more recent version, so you will see some differences.

  What does software provide and how does it make device

Hardware and Software are in many items we use in our daily lives. Name a few items in your house or office that have some sort of hardware and software. Look beyond your computer and other devices used with your computer.

  Create a program that displays the number of days

Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month

  Write an ascending function to test

Write an ascending function to test whether a list of integers is in strict ascending order.

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