In your programming project, you are expected to realize the game of chance called Bingo as a C ++ console application.   The details of this game played in real life are listed below:   Bingo is a game of chance played over 3 sets with a minimum of 2 and a maximum of 5 players.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
  1. In your programming project, you are expected to realize the game of chance called Bingo as a C ++ console application.

 

The details of this game played in real life are listed below:

 

  • Bingo is a game of chance played over 3 sets with a minimum of 2 and a maximum of 5 players.

 

  • In the bingo game, each player is given a unique (different) bingo card with 15 integers on it at the start of the game. These whole numbers in question are random numbers in the range of 1 (inclusive) to 90 (inclusive).

 

 

  • Each set of the game makes use of a bag of stamps with consecutive integers in the range of 1 (included) to 90 (included). A check is randomly drawn from this bag each time, and each player checks if the number on that checker exists on their bingo card. This process continues similarly until the game set is completed.

 

  • The player with 5 numbers on his card is deemed to have made the first zinc, the player with 10 numbers drawn from the bag, the second zinc, and the player with all the numbers on his card withdrawn from the bag is deemed to have made bingo.

 

 

  • The player who makes the first zinc earns 5 points, the player who makes the second zinc 10 points, and the player who makes the bingo 15 points.

 

  • When any player bingo, the relevant game set ends.

 

 

2)  The player with the highest score after 3 sets of games wins the game.

To simulate the game detailed above in a computer environment as a C ++ console application, follow the steps below in order:

i)  Declare a two-dimensional array of 10 rows and 15 columns that can store integers in the int data type. Each row of this two-dimensional array represents a bingo card. Therefore, this series has the capacity to store 10 different bingo cards.

ii)  Assign 15 unique random integers in the range of 1 (inclusive) to 90 (inclusive) to each row of this array. Prototype for this purpose

  • void CreateCards (int[][15], int);

Make use of the sub-function given in the form. The first parameter of this function is the two-dimensional array that stores bingo cards, and the second parameter is the total number of cards. Then print the contents of the series on the screen similar to the following output.       

a) Get the number of players (minimum 2 and maximum 5) from the user via the keyboard and randomly assign one of the cards stored in the two-dimensional array to each player. Then print the relevant cards on the screen similar to the following printout..

 b) Declare a 90-element one-dimensional array that stores integers of int data type to represent the bingo bag in a computer environment. Assign unique random integers in the range of 1 (inclusive) to 90 (inclusive) to each element of this array. Then print the contents of this directory on the screen similar to the following output

c) The first element of the one-dimensional array represents the first number drawn randomly from the bag during normal game, and likewise, the second element represents the second number to be drawn from the bag. Therefore, continue the game by considering all the elements of this series one by one from beginning to end and by moving all the players over the bingo cards. For example, the screenshot above tells us that the first number to search for bingo cards is 74 and the second number is 17.

d) The first player with 5 numbers on his card drawn from the bingo bag makes the first zinc and gets 5 points. When the first zinc is completed, print on the screen similar to the printout that follows which player made the first zinc and the final status of the players' cards. Use the number -1 on the cards instead of the numbers drawn from the bag.

e) The first player with 10 numbers on his card drawn from the bingo bag makes the second zinc and gets 10 points. When the second zinc is complete, print on the screen which player made the second zinc and similar to the printout following the final status of the players' cards. Use the number -1 on the cards instead of the numbers drawn from the bag.

f) The first player to withdraw from the bingo bag with 15 numbers on his card makes a bingo and earns 15 points. In this way, one set of the game is completed. After the bingo, print out which player made the bingo and the latest status of the players' cards on the screen, similar to the following printout. Use the number -1 on the cards instead of the numbers drawn from the bag.

g) Similar to the above, 2 more sets, ie 3 sets in total, must be played. In each new set, players must be assigned different random bingo cards and the bingo bag must be filled with different random whole numbers.

h) At the end of the game, print the total points of the players and the number of the winning player (the player with the highest score) on the screen.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY