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 program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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