View Single Post
Old 07-20-2014, 10:22 PM   #3
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
While and For Loops

While and For Loops mark the next useful piece of information as far as envisioning a sim-type program, as opposed to a "run a bunch of lines and exit" type programs I'd been looking at in the text book examples.

I remembered loops from VB6, and prior to the reading the chapter I knew they'd be fundamental to the sim. I imagine the main "engine" of the sim would be a loop that first reads the various game variables like time on the clock, which quarter it is, type of possession (jump ball, steal in the back court, etc.), etc. - probably many more. Based on these variables the sim would launch a function or maybe even another nested loop to generate a possession, or if the game is over, to end the loop and output results/stats etc.

I don't want to get too stuck on any specific method at this point though as I still have a lot to learn.

It's at also at this point that I'm beginning to find the Sams book less useful. Brevity and lots of code examples is the books chosen method, and although it's still easy to follow at this stage, we're about to delve into some core object-orientated programming concepts. For someone with no real exposure to this previously (like me), more detail would work better.
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote