If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

As you can see, I've got 162 cells divided into 9x3 tables. Each table contains 15 numbers and 12 empty spaces. All the numbers are between 1-90 and do not repeat. The positions of the numbers are random.

The real problem is that I have to conform to a few rules:

The sum of the numbers in each table must be equal.

There are 9 columns, which must be arranged like so: first column 1-9, second column 10-19, third column 20-29, ... , ninth column 80-90.

Hello Jack-
I am trying to follow your code, and understand what you really are wanting. All the bingo games I played were on a 5x5 board with a wild space in the middle. It looks like you are playing a slightly different type of bingo.

If I were to approach the problem:
1) I would start by creating arrays that hold the numbers for each columns (an array for 10's 20's 30's 40's etc)
2) I would randomize the arrays like you are doing,
3) I would create a single function that would populate each 9x3 box
a) the rows are built by splicing from each array. (the first column is from 10s, second column from 20 etc)
b) you need to use logic that for each row of nine, you will only place a number 5 times for each row and the other for will be blank spaces.
c) you can force a column position to be a space, when that array is empty
4) as far as the sum of numbers being equal in each table, I would need to think a little more about that. It seems like every time the number would always be 455. (I got that number by adding all the numbers from 1-90 and then dividing that by 9.)
When you are building each row, you can start with a variable goalNumber:uint= 455, and then minus each cell from goalNumber for each row. When as you are in the final row, use logic to say if the goalNumber is Large, then pick a large # from the array for each column... or conversely if the goalNumber is small, you could choose a small number from each of the column arrays.

I hope that helps- I have started by populating and randomizing the column arrays for you. Good luck!