I need to make a bingo game using java ad I’m fairly new, so how would I design the free slot?

I need to make the slot so that it counts as a regular number in the bingo game.

2 Responses to “I need to make a bingo game using java ad I’m fairly new, so how would I design the free slot?”

  1. Jack Mehoff says:

    Create a class that has an integer field that will hold the number.

  2. Cygnosis says:

    That really depends on the how you are writing the rest of the program, which depends a great deal on what it is required to do. Let’s assume that you want a program to simulate a card held by a bingo player. It will randomly generate card numbers, keep track of numbers called out and indicate if/when bingo should be called.

    I would probably start by creating a class to represent a square on a bingo card. It would have a number, and a boolean that represents whether the number has been called. I would then create a 5×5 matrix, a list of lists of CardSquare type. The CardSquare type in the middle of the matrix would get a number value of 0 and a called value of true at the beginning of the round. Every time a number is called the program would scan its CardSquare objects to see if one has that number, and if so set its called value to true. Then, also every time a number is called, your program would scan the matrix to see if there is a horizontal, vertical, or diagonal set of five lines that all have a called value of true. The CardSquare in the middle starts out with called set to true, so it’s free.

    Hope that helps.

Leave a Reply

Best Bingo Bonuses

Site US Bonus Visit
SilkBingo SilkBingo   £100 Visit
TEAandBINGO TEAandBINGO   £20 Visit
GiggleBingo GiggleBingo US Allowed $5 Visit

Bingo Bobby

Bingo Categories

Bobby’s Best

Most Popular