View Single Post
Old 08-03-2014, 11:40 PM   #27
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
Quote:
Originally Posted by CraigSca View Post
Groundhog - will be following this and will be rooting you on.

I love programming, but I know I'm not a very good one. Have dabbled in a lot of languages and, like you, focusing on Python now since I can actually use this for work. I've always dreamed of writing a lot if sports simulations (originally baseball, but focusing on college football now since TCY has gone away). Watching you learn the language has been a pleasure - and it reminds me if my early years when programming was pure joy as it was a series of discoveries like the ones you're making. Good luck with this as I will be an avid follower.

As far as Python is concerned - know that almost ANYTHING you're thinking if doing there's either a library or code for it already. Google search exactly what you're trying to do - examples will be out there.

As far as advice - I would also crest a game class whose parameters include the teams and the current state if the game. This way you can cycle through each game in a single loop - allowing you to play all the games for that days schedule concurrently (you can add a start time and a time if day parameter to determine if the game has started or not). Later down the road, but just something to think about.

Also - another thing I've found is all these classes and lists may be better serviced as a database (I've been told mongoDB is a good, free one). You'll be able to search on all data, run calculations, etc. Again, probably not something you want to think about now.

Awesome stuff - good luck!
.

Thanks, glad to have you following along!

In terms of the scheduler I guess that's kind of what I was thinking - it would be a class of team IDs and dates, and when a game is scheduled the two team IDs would be fed into the main sim engine as the primary key reference used to populate all the in-game classes/list/dictionaries etc. It's all very vague in my mind at this stage until I actually try and do it.

Right now I've just typed up the dictionaries, and have created the two NBA teams from above as well as a few teams from lower quality leagues to check the affect of lower rating players competing against similar competition.

Thanks also for the mongoDB tip. I covered Sqllite3 in the "Python in 24 hours" book very briefly, but I really, really hate SQL... maybe mongoDB is a better choice for me!
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote