Description: Bo Bing, is a dice game which is played by two players, with each player...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Description: Bo Bing, is a dice game which is played by two players, with each player in succession having a turn at throwing the dice. Each player's turn results in a score, and the scores for each player accumulate to some winning total. In this practical assignment, you will create a modified and simplified version of Bo Bing game. This will give you practice with all three control constructs (sequence, selection and repetition). We are including some design constraints in the "Programming Requirements" section, so you will also use functions. This will give you the experience of decomposing a problem into parts, and then implementing each part in one highly cohesive, loosely coupled function. Modular programming: Do not try to compile your entire program in one "big bang". Compile it piece by piece. Test each piece that you have compiled to make sure it works correctly before you add the next piece. Bo Bing Rules in this Assignment: At the beginning, each player rolls one dice, with the highest roll going first. On their turns, players put two dice into the dice cup and then roll them. They then they keep the score according to the table (see the scoring table below). This forms their running score for the round. After that, they roll again and add worth points to their running total. This process is repeated 3 times. In this programming assignment, your task is to write a simplified game for 2 players and 3 rounds. Your program should display the dice values for each round, accumulate and display the points won by each player and find the player that makes more points. Rule 1 2 3 Dice 1 Double is rolled (E.g.Dice1: 1 Dice2:1, Dice 1:5 Dice2:5.......) Neither shows 1 (E.g. Dice 1:5 Dice2:6,....) A single one is rolled (E.g. Dice 1:4 Dice2: 1,...) . Points 300 200 100 Programming Requirements: In order to implement this game you will need to write at least the following functions, but if you need more functions you can add them. • menu - This function asks the user the following: (1) Start the game by selecting who will start first (2) Exit Page 1 of 3 roll_a_dice - This function will roll a dice and return the result. The rolling action should be done randomly. compute_points - This function will compute the points won by each player at the end of each roll. It will get the dice values, then compute the points and return it to main() Sample Run: BO BING GAME Choose one from the followings: 1. Start the game by selecting who will start first 2. Exit Option: 1 BO BING STARTS Dice are rolled by each player in order to select who will start first: Dice 1 (rolled by player 1): 6 Dice 2 (rolled by player 2): 4 Player 1 is starting! ROUND 1 PLAYER 1'S TURN Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Pointa: 200 Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Points: 400 Dice are rolled: Dice 1: 5 Dice 2: 3 Points: 200 Total Points: 600 PLAYER 1'8 TURN IS OVER! ROUND 1 POINTS: 600 PLAYER 2'S TURN Dice are rolled: Dice 1: 6 Points: 300 Total Points: 300 Dice 2: 6 Dice are rolled: Dice 1: 5 Points: 200 Total Pointa: 500 Dice 2: 4 Dice are rolled: Dice 1: 3 Dice 2: 1 Points: 100 Total Points: 600 PLAYER 2'S TURN IS OVER! ROUND 1 POINTS: 600 ROUND 3 FINAL RESULT: PLAYER 1: 1200 POINTS PLAYER 2: 800 POINTS PLAYER 1 IS WINNER! CONGRATULATIONS... Write a C program about this game. Description: Bo Bing, is a dice game which is played by two players, with each player in succession having a turn at throwing the dice. Each player's turn results in a score, and the scores for each player accumulate to some winning total. In this practical assignment, you will create a modified and simplified version of Bo Bing game. This will give you practice with all three control constructs (sequence, selection and repetition). We are including some design constraints in the "Programming Requirements" section, so you will also use functions. This will give you the experience of decomposing a problem into parts, and then implementing each part in one highly cohesive, loosely coupled function. Modular programming: Do not try to compile your entire program in one "big bang". Compile it piece by piece. Test each piece that you have compiled to make sure it works correctly before you add the next piece. Bo Bing Rules in this Assignment: At the beginning, each player rolls one dice, with the highest roll going first. On their turns, players put two dice into the dice cup and then roll them. They then they keep the score according to the table (see the scoring table below). This forms their running score for the round. After that, they roll again and add worth points to their running total. This process is repeated 3 times. In this programming assignment, your task is to write a simplified game for 2 players and 3 rounds. Your program should display the dice values for each round, accumulate and display the points won by each player and find the player that makes more points. Programming Requirements: In order to implement this game you will need to write at least the following functions, but if you need more functions you can add them. O *menu - This function asks the user the following: (1) Start the game by selecting who will start first (2) Exit *roll_a_dice - This function will roll a dice and return the result. The rolling action should be done randomly. *compute_points - This function will compute the points won by each player at the end of each roll. It will get the dice values, then compute the points and return it to main() Sample Run: BO BING GAME! Choose one from the followings: 1. Start the game by selecting who will start first 2. Exit Option: 1 BO BING STARTS Dice are rolled by each player in order to select who will start first: Dice 1 (rolled by player 1): 6 Dice 2 (rolled by player 2): 4 Player 1 is starting! ROUND 1 -PLAYER 1'S TURN Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Points: 200 Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Points: 400 Dice are rolled: Dice 1: 5 Dice 2:3 Points: 200 Total Points: 600 PLAYER 1'S TURN IS OVER! ROUND 1 POINTS: 600 PLAYER 2'S TURN Dice are rolled: Dice 1: 6 Dice 2: 6 Points: 300 Total Points: 300 Dice are rolled: Dice 1: 5 Dice 2: 4 Points: 200 Total Points: 500 Dice are rolled: Dice 1: 3 Dice 2: 1 Points: 100 Total Points: 600 PLAYER 2'S TURN IS OVER! ROUND 1 POINTS: 600 ROUND 2 ROUND 3 FINAL RESULT: PLAYER 1: 1200 POINTS PLAYER 2: 800 POINTS PLAYER 1 IS WINNER! CONGRATULATIONS... Description: Bo Bing, is a dice game which is played by two players, with each player in succession having a turn at throwing the dice. Each player's turn results in a score, and the scores for each player accumulate to some winning total. In this practical assignment, you will create a modified and simplified version of Bo Bing game. This will give you practice with all three control constructs (sequence, selection and repetition). We are including some design constraints in the "Programming Requirements" section, so you will also use functions. This will give you the experience of decomposing a problem into parts, and then implementing each part in one highly cohesive, loosely coupled function. Modular programming: Do not try to compile your entire program in one "big bang". Compile it piece by piece. Test each piece that you have compiled to make sure it works correctly before you add the next piece. Bo Bing Rules in this Assignment: At the beginning, each player rolls one dice, with the highest roll going first. On their turns, players put two dice into the dice cup and then roll them. They then they keep the score according to the table (see the scoring table below). This forms their running score for the round. After that, they roll again and add worth points to their running total. This process is repeated 3 times. In this programming assignment, your task is to write a simplified game for 2 players and 3 rounds. Your program should display the dice values for each round, accumulate and display the points won by each player and find the player that makes more points. Rule 1 2 3 Dice 1 Double is rolled (E.g.Dice1: 1 Dice2:1, Dice 1:5 Dice2:5.......) Neither shows 1 (E.g. Dice 1:5 Dice2:6,....) A single one is rolled (E.g. Dice 1:4 Dice2: 1,...) . Points 300 200 100 Programming Requirements: In order to implement this game you will need to write at least the following functions, but if you need more functions you can add them. • menu - This function asks the user the following: (1) Start the game by selecting who will start first (2) Exit Page 1 of 3 roll_a_dice - This function will roll a dice and return the result. The rolling action should be done randomly. compute_points - This function will compute the points won by each player at the end of each roll. It will get the dice values, then compute the points and return it to main() Sample Run: BO BING GAME Choose one from the followings: 1. Start the game by selecting who will start first 2. Exit Option: 1 BO BING STARTS Dice are rolled by each player in order to select who will start first: Dice 1 (rolled by player 1): 6 Dice 2 (rolled by player 2): 4 Player 1 is starting! ROUND 1 PLAYER 1'S TURN Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Pointa: 200 Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Points: 400 Dice are rolled: Dice 1: 5 Dice 2: 3 Points: 200 Total Points: 600 PLAYER 1'8 TURN IS OVER! ROUND 1 POINTS: 600 PLAYER 2'S TURN Dice are rolled: Dice 1: 6 Points: 300 Total Points: 300 Dice 2: 6 Dice are rolled: Dice 1: 5 Points: 200 Total Pointa: 500 Dice 2: 4 Dice are rolled: Dice 1: 3 Dice 2: 1 Points: 100 Total Points: 600 PLAYER 2'S TURN IS OVER! ROUND 1 POINTS: 600 ROUND 3 FINAL RESULT: PLAYER 1: 1200 POINTS PLAYER 2: 800 POINTS PLAYER 1 IS WINNER! CONGRATULATIONS... Write a C program about this game. Description: Bo Bing, is a dice game which is played by two players, with each player in succession having a turn at throwing the dice. Each player's turn results in a score, and the scores for each player accumulate to some winning total. In this practical assignment, you will create a modified and simplified version of Bo Bing game. This will give you practice with all three control constructs (sequence, selection and repetition). We are including some design constraints in the "Programming Requirements" section, so you will also use functions. This will give you the experience of decomposing a problem into parts, and then implementing each part in one highly cohesive, loosely coupled function. Modular programming: Do not try to compile your entire program in one "big bang". Compile it piece by piece. Test each piece that you have compiled to make sure it works correctly before you add the next piece. Bo Bing Rules in this Assignment: At the beginning, each player rolls one dice, with the highest roll going first. On their turns, players put two dice into the dice cup and then roll them. They then they keep the score according to the table (see the scoring table below). This forms their running score for the round. After that, they roll again and add worth points to their running total. This process is repeated 3 times. In this programming assignment, your task is to write a simplified game for 2 players and 3 rounds. Your program should display the dice values for each round, accumulate and display the points won by each player and find the player that makes more points. Programming Requirements: In order to implement this game you will need to write at least the following functions, but if you need more functions you can add them. O *menu - This function asks the user the following: (1) Start the game by selecting who will start first (2) Exit *roll_a_dice - This function will roll a dice and return the result. The rolling action should be done randomly. *compute_points - This function will compute the points won by each player at the end of each roll. It will get the dice values, then compute the points and return it to main() Sample Run: BO BING GAME! Choose one from the followings: 1. Start the game by selecting who will start first 2. Exit Option: 1 BO BING STARTS Dice are rolled by each player in order to select who will start first: Dice 1 (rolled by player 1): 6 Dice 2 (rolled by player 2): 4 Player 1 is starting! ROUND 1 -PLAYER 1'S TURN Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Points: 200 Dice are rolled: Dice 1: 2 Dice 2: 3 Points: 200 Total Points: 400 Dice are rolled: Dice 1: 5 Dice 2:3 Points: 200 Total Points: 600 PLAYER 1'S TURN IS OVER! ROUND 1 POINTS: 600 PLAYER 2'S TURN Dice are rolled: Dice 1: 6 Dice 2: 6 Points: 300 Total Points: 300 Dice are rolled: Dice 1: 5 Dice 2: 4 Points: 200 Total Points: 500 Dice are rolled: Dice 1: 3 Dice 2: 1 Points: 100 Total Points: 600 PLAYER 2'S TURN IS OVER! ROUND 1 POINTS: 600 ROUND 2 ROUND 3 FINAL RESULT: PLAYER 1: 1200 POINTS PLAYER 2: 800 POINTS PLAYER 1 IS WINNER! CONGRATULATIONS...
Expert Answer:
Answer rating: 100% (QA)
Code include include function prototypes int menu int rolladice main function int main int option va... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Create a risk management plan. You have a budget of $100,000 and a timeline of six (6) months for the plan. Refer to Figure A-1, Risk Management Plan Template, from Appendix A of the Hillson and...
-
In this Assignment you will create a class that represents a Social Media profile (like a Facebook profile many of you have). The name of this class will be SocialMediaProfile . There are many things...
-
Craps is a dice game in which two fair dice are cast. If the roller shoots a 7 or 11 on the rst roll, he or she wins. If the roller shoots a 2, 3, or 12 on the rst roll, he or she loses. (a) Compute...
-
Net sales revenue, net income, and common stockholders' equity for Vallen Optical Corporation, a manufacturer of contact lenses, follow for a four-year period. Requirements 1. Compute trend...
-
Suzie purchases two goods, food and clothing. She has the utility function U(x, y) = xy, where x denotes the amount of food consumed and y the amount of clothing. The marginal utilities for this...
-
In Exercises 714, simplify each rational expression. Find all numbers that must be excluded from the domain of the simplified rational expression. x 14x + 49 x - 49 X
-
Discuss what corporate governance is and why it is important to shareholders.
-
The 2008 annual reports of Pearson Plc and The McGraw-Hill Companies, Inc. , two publishing and information services companies, included the following selected data as at December 31, 2008, and 2007:...
-
Jetson Corporation generated excess cash and invested in securities as follows: View the transactions. Read the requirements. Requirement 1. Classify each of the investments made during 2025. (Assume...
-
The Ploughman family owns and operates a 640-acre farm that has been in the family for several generations. The Ploughmans always have had to work hard to make a decent living from the farm and have...
-
The organizations Controller has received a notice from the Canada Revenue Agency (CRA) advising that the organization will be changing from an Accelerated threshold 1 remitter to an Accelerated...
-
You're an associate at GreenTech Ventures, and you've been tasked with estimating the Total Addressable Market (TAM) for EV charging stations in the state of New York for the year 2025. You have the...
-
Complete the square and determine the vertex for the following function. s(x) = -2x - 16x-29 Complete the square.
-
You are a Supervisor in the OperationsDepartment for XYZ company. You manage 50 employees in the department. Each week, employees are tasked with submitting reports. Recently, there have been many...
-
In 2017, Eraser Corp had Revenue of $229 million, Cost of Goods Sold of $117 million (this includes Depreciation of $46 million), Sales General and Admin Expenses of $33 million, and faced a tax rate...
-
d The function, p(d)=1+ gives the pressure, in atmospheres (atm), at a depth d in the sea (d 33 is in feet). Note that p(0)=1 atm, p(33)=2, and so on. Find the pressure at 60 feet. The pressure at 60...
-
Saga Tech, Inc. just paid a dividend of $ 4 . 0 0 per share ( that is , DO = 4 . 0 0 ) . Thedividends of SagaTech are expected to grow at a rate of 2 0 percent next year ( that is , g 1 = 2 0 ) and...
-
The landing gear of an aircraft with: mass of 2000 kg the spring-mass-damper system Consider that the runway surface is y(t) = 0.2 cos 157.08t stiffness of the spring is 5 x 105 N/m. What is the...
-
An all-NFA M is a 5-tuple (Q,, , q 0 , F) that accepts x * if every possible state that M could be in after reading input x is a state from F. Note, in contrast, that an ordinary NFA accepts a...
-
A two-dimensional finite automaton (2DIM-DFA) is defined as follows. The input is an m n rectangle, for any m, n 2. The squares along the boundary of the rectangle contain the symbol # and the...
-
Use the result of Problem 6.21 to give a function f that is computable with an oracle for A TM , where for each n, f(n) is an incompressible string of length n. Problem 6.21 Show how to compute the...
-
If information systems auditors perform a staff function, which of the following aspects of leadership is likely to be most difficult to accomplish? a. Motivating information systems auditors to...
-
Which of the following is least likely to be a purpose of a yearly staff appraisal meeting conducted between an information systems auditor and his/her manager? a. To determine the interpersonal...
-
Which of the following is least likely to be a reason why the career paths available to information systems auditors are often limited? a. Many organizations have only a few information systems audit...
Study smarter with the SolutionInn App