Ask Computer Engineering Expert

You need help in my Programing assignment in C++ please ,  uploaded this assignment twic and no one gave me the right solution.

Develop and implement an interactive two-player Yahtzee game. Yahtzee is a dice game that was invented by Milton Bradley and Edwin S. Lowe in 1956.

The challenge of the game is to outduel the other player by scoring the most points. Points are obtained by rolling five 6-sided die across thirteen rounds. During each round, each player may roll the dice up to three times to make one of the possible scoring combinations.

Once a combination has been achieved by the player, it may not be used again in future rounds, except for the Yahtzee combination may be used as many times as the player makes the combination. Each scoring combination has different point totals. Some of these totals are achieved through the accumulation of points across rolls and some are obtained as fixed sequences of values.

The Rules of Yahtzee:

The scorecard used for Yahtzee is composed of two sections. A upper section and a lower section. A total of thirteen boxes or thirteen scoring combinations are divided amongst the sections. The upper section consists of boxes that are scored by summing the value of the dice matching the faces of the box.

If a player rolls four 3's, then the score placed in the 3's box is the sum of the dice which is 12. Once a player has chosen to score a box, it may not be changed and the combination is no longer in play for future rounds. If the sum of the scores in the upper section is greater than or equal to 63, then 35 more points are added to the players overall score as a bonus. The lower section contains a number of poker like combinations. See the table provided below:

Name

Combination

Score

Three-of-a-kind

Three dice with the same face

Sum of all face values on the 5 dice

Four-of-a-kind

Four dice with the same face

Sum of all face values on the 5 dice

Full house

One pair and a three-of-a-kind

25

Small straight

A sequence of four dice

30

Large straight

A sequence of five dice

40

Yahtzee (think five-of-a-kind)

Five dice with the same face

50

Chance

May be used for any sequence of dice; this is the catch all combination

Sum of all face values on the 5 dice

What is required for this assignment?

You may design the Yahtzee game with functions that you see fit. I recommend that you start with a structure chart and determine sub-problems and functions accordingly. 

You must also take advantage of applying pointers, output parameters, and/or arrays! Your Yahtzee game must also implement the following algorithm:

(1) Print a game menu for Yahtzee with the following options:

            1. Print game rules

            2. Start a game of Yahtzee

            3. Exit

(2) Get a menu option from the user; clear the screen

(3) If option 1 is entered, then print the game rules stated above and repeat step (1)

     otherwise if option 2 is entered, then continue on to step (4); player 1 starts the game

     otherwise if option 3 is entered, then print a goodbye message and quit the program

     otherwise repeat step (1)

(4) Ask the player to hit any key to continue on to roll the five dice

(5) Roll the five dice and display the face values of each die; enumerate each die with

     a number 1 - 5; add 1 to the total number of rolls for this round

(6) If the total number of rolls for this round is less than three,

         then ask the player (Y/N) if he/she wants to use the roll for one of the game combinations

     otherwise a combination must be selected.

            1. Sum of 1's        7. Three-of-a-kind

            2. Sum of 2's        8. Four-of-a-kind

            3. Sum of 3's        9. Full house

            4. Sum of 4's        10. Small straight

            5. Sum of 5's        11. Large straight

            6. Sum of 6's        12. Yahtzee

                        13. Chance

(7) If the number of rolls is three or "yes" is entered, then save the combination and it may not be selected again in the future

          (Note: The selection of the combination must be verified. If the user selects full house, but does not have one, then your

           must assign 0 points for the combination);

          continue on to step (8); clear the screen

     otherwise if "no" is entered, ask the user which dice to re-roll (1 - 5); re-roll the selected die or dice; clear the screen;

         repeat step (6)

     otherwise repeat step (6)

(8)  Alternate players

(9) If each player has rolled for the round, then increment the round number

         if the round number is equal to 14, then continue on to step (10)

         otherwise repeat step (4)

     otherwise repeat step (4)

(10) If the total score in the upper section is greater than or equal to 63 for a player, then add 35 points to the total score

(11) Print the scores for both players and print the winner

(12) Repeat step (1)

-Your project must contain one header file (a .h file), two C source files (which must be .c files), and project workspace.

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 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