| Posted: January 18, 2012, 10:29 pm - IP Logged | |
What is happening here is that each number is given a status of active or inactive, based on if it is in Group A.
A count-up is given from 000 to 999 (although 789 would work just as well)
The "count" value is broken down into its 3 component digits.
These digits are checked to see if they are
a) low to high
b) unequal from each other and
c) all among the "active" numbers
Checking each combo is not the most efficient way to do things, but is the simplest to code and understand. That's what you need in the beginning. Slow running, but readable. Using F5, F8, and the break function helps, too.
When you get to Pick 5 games, where you're potentially looking at 300,000 ~ 1,000,000 combinations, then you drop simplicity and aim for efficiency of processing time. Then you would write it exactly as you described it above -- taking the given numbers and creating the list from them. Of course, when you get to that level, you're no longer asking "How do I ... ?", you're writing this stuff in your sleep and just looking for new ideas. If you've looked as some of the old lexi code posted here, you've no doubt noticed that much of it isn't very clearly explained and it looks a lot like spaghetti. 
That's what fast running code looks like. 
In neo-conned Amerika, bank robs you.
Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.