Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Specification: Write a program that allows a single Player (the user to play a simple three dice game of chance against a single Opponent

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Program Specification: Write a program that allows a single Player (the user to play a simple three dice game of chance against a single Opponent (the computer) Game Description There is a single Player (human), with three dice There is a single Opponent (computer), with three dice. Each die is twelve sided, and each of its sides is labeled with a unique number from 1 to 12 When a die is rolled it stops with one of its sides facing up, we will call this the value of the die roll. A game is made up of rounds, a single round is played as such 1. The computer Opponent rolls its dice 2. The dice are displayed 3. The Player rolls their dice A. The dice are displayed 5. A determination is made as to who won the round, this determination is made via the following rules: Larger values beat smaller values, same values are a tie. A Triple is when all the dice have the same number on their top faces, the value of the Triple is this common value. A Pair is when exactly two of the dice have the same number on their top faces, the value of the pair is this common value. A Nothing is then when all the dice have a different number on their top faces. Any Triple beats any Pair Any Triple beats any Nothing. Two Triples are compared by their respective Triple values. Any Pair beats any Nothing. Two Pairs are first compared by their respective Pair values, and then by their respective common die values. non Two Nothings always tie. 6. The result of the round (with respect to the Player) is announced. 7. The result of the round (with respect to the Player) is tallied, by increasing the number of player wins, ties, or loses by one The player is asked if they wish to play another round

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

8. Explain how to price managerial and professional jobs.

Answered: 1 week ago