View Single Post
  #13  
Old 08-23-2006, 07:02 PM
Shaun Shaun is offline
Registered User
Shaun's Avatar
Join Date: Jul 2003
Location: Canada
Posts: 1,070
Shaun is a jewel in the roughShaun is a jewel in the rough
The first part, of any coding, is algorithmic design.

With Bingo, you want to know how it'll work before you begin.

You'll have a field:

B I N G O
b1 i1 n1 g1 o1
b2 i2 n2 g2 o2
b3 i3 n3 g3 o3
b4 i4 n4 g4 o4
b5 i5 n5 g5 o5

Those values in the field? Well, you'll generate random numbers for each one, using a loop. For the b's, you'll have a random value between 0-19. For i's 20-39. Etc. Be sure that no number repeats

So now you have your game board. There's three more steps to bingo. Generating a single random number, identifying the part of the game board that has a matching value (if at all) using loops, and identifying patterns/lines that determine winning the game.

You asked for your start, so here it is.
Reply With Quote