S
Ste Wilko
Guest
Hi,
I'm trying to generate "Housie" bingo cards in VB.Net but I'm hitting a brick wall and cannot think how to do it. I'm presuming I need multi-dimensional arrays, but what I have tried to do in the past has just caused the applications to hang indefinitely.
I can't remember what code I've tried in the past, because I keep trying to pick this project up and end up putting it down because I get so frustrated with it.
For reference a "Housie" bingo ticket is used in the UK and is different to the bingo played in the US.
The rules to generating a "Housie" ticket are as follows
1. Each ticket contains 9 columns and 3 rows (giving a total of 27 squares)
2. Each row will consist of 5 spaces with numbers in and 4 blank spaces
3. Each column has a specified range of numbers that can occupy it (e.g. column 1 will contain numbers 1-9, column 2 will contain number 10-19, etc etc etc, and column 9 will contain numbers 80-90)
4. Each column will be sorted in ascending order
5. Each column must contain at least one number over the three rows (e.g. column 5 can be empty in rows 1 &2, but then must contain a value in 3)
6. No number can be repeated
Extra: 7. 6 tickets combined will contain ALL the numbers 1-90 if generated together
Example "Housie" ticket
If anyone can point me in the right direction, or start me off with some code examples, that would be greatly appreciated!
Continue reading...
I'm trying to generate "Housie" bingo cards in VB.Net but I'm hitting a brick wall and cannot think how to do it. I'm presuming I need multi-dimensional arrays, but what I have tried to do in the past has just caused the applications to hang indefinitely.
I can't remember what code I've tried in the past, because I keep trying to pick this project up and end up putting it down because I get so frustrated with it.
For reference a "Housie" bingo ticket is used in the UK and is different to the bingo played in the US.
The rules to generating a "Housie" ticket are as follows
1. Each ticket contains 9 columns and 3 rows (giving a total of 27 squares)
2. Each row will consist of 5 spaces with numbers in and 4 blank spaces
3. Each column has a specified range of numbers that can occupy it (e.g. column 1 will contain numbers 1-9, column 2 will contain number 10-19, etc etc etc, and column 9 will contain numbers 80-90)
4. Each column will be sorted in ascending order
5. Each column must contain at least one number over the three rows (e.g. column 5 can be empty in rows 1 &2, but then must contain a value in 3)
6. No number can be repeated
Extra: 7. 6 tickets combined will contain ALL the numbers 1-90 if generated together
Example "Housie" ticket
If anyone can point me in the right direction, or start me off with some code examples, that would be greatly appreciated!
Continue reading...