For your programming pleasure...
I'm posting source code for generating full wheels, any number per game, any number to wheel (>= number per game). You can download it from http://www.doublemania.com/lotto649/fullwheel.zip
This is going to be part of some home-brew software I'm making. I'm still wrestling with other issues, including how to smartly pick rows from the wheel that give uniform coverage of all numbers wheeled. Please see my earlier post in forum Lottery Wheels, and reply on that thread if you have an algorithm for that.
You may feel free to use the source I'm posting now, any way you wish. You'll see it includes two C++ classes:
1) CGame, which contains the picks for one row in the wheel, and
2) CWheel, which fills and contains the CGame objects.
CWheel starts by computing the total combos, given number per game and number to wheel. Then it iterates through these one at a time, and (recursively) generates each new game. It's designed to run in a worker thread that notifies the main (GUI) thread every so often, so on-screen status can be updated as the wheel is generated. I have tested it quite a bit, and I'm certain it works correctly.
Enjoy! Let me know if you have a smarter way to fill the games in the full wheel. And if you have a good way to select for uniform coverage from the full wheel, please reply to my earlier post in the Lottery Wheels forum.
Sam
I'm posting source code for generating full wheels, any number per game, any number to wheel (>= number per game). You can download it from http://www.doublemania.com/lotto649/fullwheel.zip
This is going to be part of some home-brew software I'm making. I'm still wrestling with other issues, including how to smartly pick rows from the wheel that give uniform coverage of all numbers wheeled. Please see my earlier post in forum Lottery Wheels, and reply on that thread if you have an algorithm for that.
You may feel free to use the source I'm posting now, any way you wish. You'll see it includes two C++ classes:
1) CGame, which contains the picks for one row in the wheel, and
2) CWheel, which fills and contains the CGame objects.
CWheel starts by computing the total combos, given number per game and number to wheel. Then it iterates through these one at a time, and (recursively) generates each new game. It's designed to run in a worker thread that notifies the main (GUI) thread every so often, so on-screen status can be updated as the wheel is generated. I have tested it quite a bit, and I'm certain it works correctly.
Enjoy! Let me know if you have a smarter way to fill the games in the full wheel. And if you have a good way to select for uniform coverage from the full wheel, please reply to my earlier post in the Lottery Wheels forum.
Sam