Link to home
Start Free TrialLog in
Avatar of pogi457
pogi457Flag for Philippines

asked on

Help bingo card generator for US and UK card?

Hi,

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

Thanks so much
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

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.
Avatar of pogi457

ASKER

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
Ok, is enough to work. One more thing, what type of output do you need? Screen, printer...?
Avatar of pogi457

ASKER

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!
Avatar of pogi457

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pogi457

ASKER

Excellent. Thank you so much!!!!
Avatar of sadshead
sadshead

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?