Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal of this assignment is to build a simulation of a popular children's dice game named Beat That. Beat That is an educational


Screenshot 2023-11-19 at 10.53.49 PM.png


Screenshot 2023-11-19 at 10.53.58 PM.png


Screenshot 2023-11-19 at 10.54.08 PM.png  

The goal of this assignment is to build a simulation of a popular children's dice game named Beat That. Beat That is an educational game in which children learn strategic thinking and the concept of place value. For more information about this and other dice games, see https://funattic.com/dice-games/ B. While the rules of the game can be flexible, we will be playing a basic version in which two players (Player A and Player B) are rolling two dice in a 5-round game. Game play is based on rounds. In each round, players take a turn in which they roll two dice. After rolling the dice, the player decides how to use the two dice values to form a 2-digit number. The goal is to arrange the digits so that they form the highest number possible. Since you are developing your computer programming skills rather than your number literacy skills, your program will automatically make the choice for the player-choosing the highest of the two possible combinations as the player's number choice for that round. In choosing for the player in this manner you are simulating the play of an expert player of Beat That rather than simulating the play of a novice. At the close of the round, your program will compare players' number choices for that round to determine the round scoring. The player with the highest number choice wins the round. There are 3 possible scoring outcomes of a round: The Players Tie this Round Player A Wins this Round Player B Wins this Round The program will print a message to announce the outcome of the round. The player who wins a round scores 1 point in the overall game. The player who loses the round does not score a point in the overall game. If the players are tied for the round, then neither player scores a point in the overall game. When five rounds have been played, the program will determine the outcome of the overall game based upon points earned. There are three possible outcomes of a game: The Players Tie the Game Player A Wins the Game Player B Wins the Game The program will print a message to announce the outcome of the game. Exercise 1 Create a program named beat_that_single_round. Based upon the description above, the program should implement the functionality for playing a single round of Beat That. When this program is run multiple times, the console sessions should look like this: Playing round 1 of Beat That... Player A rolls (4, 6) Player A chooses 64. Player B rolls (4, 3) Player B chooses 43. Player A Wins This Round! Player A score is 1 and Player B score is 0 Playing round 1 of Beat That... Player A rolls (2, 6) Player A chooses 62. Player B rolls (6, 3) Player B chooses 63. Player B Wins This Round! Player A score is 0 and Player B score is 1 Playing round 1 of Beat That... Player A rolls (5, 4) Player A chooses 54. Player B rolls (5, 4) Player B chooses 54 Players Tie This Round. Player A score is 0 and Player B score is 0 Exercise 2 Create a program named beat_that_five_round_game. Based upon the description above, the program should implement the functionality for playing a 5-round game of Beat That. When this program is run, the console session should look like this: Playing round 1 of Beat That... Player A rolls (2, 1) Player A chooses 21 Player B rolls (5, 2) Player B chooses 52 Player B Wins This Round! Playing round 2 of Beat That... Player A rolls (2, 2) Player A chooses 22 Player B rolls (1, 5) Player B chooses 51 Player B Wins This Round! Playing round 3 of Beat That... Player A rolls (4, 2) Player A chooses 42 Player B rolls (6, 1) Player B chooses 61 Player B Wins This Round! Playing round 4 of Beat That... Player A rolls (6, 4) Player A chooses 64 Player B rolls (4, 2) Player B chooses 42 Player A Wins This Round! Playing round 5 of Beat That... Player A rolls (2, 5) Player A chooses 52 Player B rolls (1, 5). Player B chooses 51 Player A Wins This Round! Game score: Player A has won 2 rounds.. Player B has won 3 rounds. Player B Wins This Game!

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

Managerial Accounting

Authors: John J. Wild, Ken W. Shaw

2010 Edition

9789813155497, 73379581, 9813155493, 978-0073379586

More Books

Students also viewed these Algorithms questions

Question

4/9 2 Perform the indicated operation by hand.

Answered: 1 week ago