In Summary...
I made a nice bit of progress on the simulation program. Tonight's big goal was to get
Then it turns out that each scoring category has its own notion of what is "better" for the purposes of ranking. It turns out that this was relatively simple to express in the
By putting the power of the Collections package to use I simply had to stuff a few objects in a
Now the next challenge is to start working on the innards of the Hibernate queries and get them plumbed into the
League objects to understand how to rank their Teams. There is more to this than may appear at first glance. First, you are not simply ordering the teams 1st place, 2nd place, and so on. Instead you are awarding points to each team based on their position in the category. For a ten-team league, the first place team gets ten points, the second place team gets nine and so on.
Then it turns out that each scoring category has its own notion of what is "better" for the purposes of ranking. It turns out that this was relatively simple to express in the
Category instances themselves. This kept the code in the League relatively straightforward and pushed a lot of the details about per-category ranking into the Category objects themselves.
By putting the power of the Collections package to use I simply had to stuff a few objects in a
List and hand it a custom Comparator to sort them. Piece o' cake.
Now the next challenge is to start working on the innards of the Hibernate queries and get them plumbed into the
PlayerPool. Once those are all running I'll be ready to run a maiden-voyage of the simulation. I still need to add a little more Hibernate plumbing to write-down the results. After that, then I can consider grabbing some graphing package and doing a little data-analysis. It's now over yet...


0 Comments:
Post a Comment
<< Home