Closed hatfield-c closed 5 years ago
This issue is now complete, and is available on the branch LOT-5. Please QA on that branch, and have a nice day. :)
This issue has passed QA, and the branch LOT-5 has been merged with master.
This issue is now finished, and will be closed.
The logic for loading processes is fairly contained, and can be placed inside of whatever condition controls lottery success. Thus, the challenge for developing the lottery system becomes keeping track of the number of tickets active at any given moment, and determining when the lottery "hits".
We can use a for loop to go through all the processes, determining if their tickets match the winning number as we go along, so we only need to worry about a "maximum" number so that our generator doesn't spend most of its time throwing numbers without associated processes.
The easiest way to determine the max number of tickets per lottery, would be to loop over the process table during each lottery to determine the number of "active tickets" at any given time. After that, the number generator can do its thing with its new max value, and then the lottery can loop through the processes again to determine a winner.