Solved

Help bingo card generator for US and UK card?

Posted on 2008-10-06
8
1,220 Views
Last Modified: 2012-05-05
Hi,

Please help me create a bingo card generator for both US and UK.

Thanks so much
0
Comment
Question by:pogi457
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 22657029
Please post any requirements. Hoy many numbers by line (for both US & UK), hoy many lines, numbers range, hoy many blank spaces by line, etc.
0
 

Author Comment

by:pogi457
ID: 22657053
U.S. bingo cards are 5x5 squares, with the columns labeled B-I-N-G-O and with spots contains numbers between 1 and 75. The center square typically is a free spot, and often has the word "free" printed on it.

Column B contains numbers 1 - 15
Column I contains numbers 16 - 30
Column N contains numbers 31 - 45
Column G contains numbers 46 - 60
Column O contains numbers 61 - 75

UK Bingo, or Housie, cards are usually called tickets and differ greatly from U.S. Bingo cards. The cards contain three rows and nine columns. Each row contains five numbers and four blank spaces. Each column contains one, two or three numbers.

Column 1 contains numbers 1 - 9
Column 2 contains numbers 10 - 19
Column 3 contains numbers 20 - 29
Column 4 contains numbers 30 - 39
Column 5 contains numbers 40 - 49
Column 6 contains numbers 50 - 59
Column 7 contains numbers 60 - 69
Column 8 contains numbers 70 - 79
Column 9 contains numbers 80 - 90
0
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 22657144
Ok, is enough to work. One more thing, what type of output do you need? Screen, printer...?
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

Author Comment

by:pogi457
ID: 22657499
I will need that to be put on a string semicolon separated, like

10;23;41;57;67;6;18;42;55;65;2;21;F;46;66;4;26;37;56;61;12;29;34;47;71

so this means the card will look like this

B     I     N   G    O
10  23   41  57  67
  6  18   42  55  65
  2  21    F   46  66
  4  26   37  56  61
12  29   34  47  71

Thank you so much for your help!
0
 

Author Comment

by:pogi457
ID: 22657508
In addition, I believe for every columns, number cannot be repeated like for example in:
B - 10, 6, 2, 4, 12

You can't have 12 appearing more than once
B - 10, 6, 12, 4, 12

Thanks again

0
 
LVL 25

Accepted Solution

by:
Luis Pérez earned 500 total points
ID: 22657926
Here's your code. I've made a vb.net class, called BingoCard, extremely easy to use. The class in attached as file (in txt format as Experts Exchange doesn't allow to upload files with .vb extension). The source code shows how to use the class.

Hope that helps.
'Create a new bingo card
Dim oCard As New BingoCard
 
'Fill with desired schema
oCard.Fill(BingoCard.CardSchemes.US) 'or UK
 
'The results number can be readed in the ToString function of the object
Dim s As String = oCard.ToString()

Open in new window

BingoCard.txt
0
 

Author Closing Comment

by:pogi457
ID: 31503717
Excellent. Thank you so much!!!!
0
 
LVL 1

Expert Comment

by:sadshead
ID: 23385485
Your code is nearly perfect and has been extremly useful but there is one rule missing for the UK bingo card generation...

You should only have a maximum of 2 numbers per Column. How would i go abot modifying the class to allow for this additional rule?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
API v SOA 8 42
PowerShell:  Column widths won't expand 3 49
How can I do Unit Testing with Session ? 1 23
Cannot kill Excel from taskmgr after Excel Export in VB 2014 6 39
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question