Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here's the general idea of the game. Each player has a bingo card, each card is a 5 X 5 grid. The items that you

Here's the general idea of the game. Each player has a "bingo" card, each card is a 5 X 5 grid.

The items that you will use for the cards are specified on*** (because I can't provide 3rd party URL, so I will list its content:

motorcycle police car fire truck ambulance military vehicle bus airport shuttle limousine Hummer Mini-Cooper PT Cruiser Austin Healey convertible electric car bicycle cows stop sign camper taxi pizza delivery tow truck dump truck cemetary logging truck mattress on roof sailboat hotel willow tree blue van flying pig sports team bumper sticker Canadian flag service center dog in car someone stopped by police for sale sign revolving sign birds on a wire field of flowers clothesline traffic cone a shoe on the road Tim Hortons baseball game airplane license plate starting with A Quebec license plate US license plate yeild sign construction sign baby on board sign church barn hawk

There may be up to 3 players at one time, each having a randomly generated card. Prior to each game, the goal (ie. how a player obtains a "bingo" and wins the game) is set -- perhaps a full card or 4 corners. (Possible goals are defined below).

When your program starts, it will read the website consisting of the potential items and store it as a list of strings. The data should be read and the data stored only once even if the user chooses to play the game multiple times. The data must be read by your program --- the items must NOT be hard-coded in your program.

There may be 1-3 players for each round. Each player is identified by a name (the user should be prompted for the number of players and a name for each player which will be used to identify the player). As each player is added, a card is generated for them. The card is generated by randomly selecting items from the list of potential items. Each item may appear at most once on any one card but items may appear on more than one of the cards.

Each round proceeds as follows:

1) cards are written to the screen (formatting is not terribly important but \t (a tab) will be useful for formatting). Those items that have been "found" should be clearly marked as such. You do not need to keep track of which items were found, only that the item in a particular location has been marked as found. Your output may look something like this: (Note that this is for a 3X3 card -- yours will be 5X5 cards):

Henrietta's card: (*Border is not needed*)

convertible bus ambulance
FOUND train stop sign
yield sign FOUND FOUND

Steve's card:

dog fire truck FOUND
FOUND FOUND FOUND
ambulance shoe on road FOUND

2) the (simulated) caller chooses an item randomly from the list of potential items and displays it on the screen. The caller is prompted by user input - that is, the user should initiate a new item being "called" by some sort of input. For instance, after printing the current cards on the screen, your program might prompt the user for some value to indicate that the caller should "see" a new item. Items may be "seen" only once per round so you will need to keep track of what has already been called.

3) each card is checked to see if the newly seen item appears on the card. If so, the item is "marked" as "FOUND" and the card is checked for a valid Bingo.

4) if a Bingo is found, the winning card is printed on the screen with a message saying "XXX wins!" (where XXX is the player's name). There may be more than one winner --- your program should check all cards in each round & declare all the winners). If a Bingo is found, the current game ends. The user should be given the opportunity to play again -- at which time your program begins again by asking for the number of players, their names and a goal.. You should not re-read the data file (it should not have changed in the previous round).

Goals

A "goal" indicates the rules that must be satisfied in order to declare that a Bingo has been achieved. We will implement three goals from which the user may choose:

  1. Full Card -- all items on the card must be found.
  2. Single Line -- all items in a single horizontal or vertical line must be marked as FOUND
  3. Four Corners -- the items in each of the four corners of the card must be marked as FOUND.

Thanks for your help!

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

Fundamental Accounting Principles

Authors: John J. Wild, Ken W. Shaw, Barbara Chiappetta

20th Edition

1259157148, 78110874, 9780077616212, 978-1259157141, 77616219, 978-0078110870

Students also viewed these Accounting questions