[Cs5500] Tournament class updates

Rick Keilty rkeilty at ccs.neu.edu
Mon Apr 11 21:30:41 EDT 2011


Greetings class,

I've made some changes to the Tournament class and I wanted to let you know
the reasons behind it.  Previously, when the tournament manager set a
tournament to the running state, and called the start() method of the
tournament, that was a blocking call and was preventing the main
TournamentManager thread from continuing to update the status of other
tournaments.

I made the Tournament class Runnable (which we had discussed in a previous
class), and now spawned it off into its own thread, so it isn't blocking,
and so we know when the Tournament has completed (basically when the thread
dies).

One more change the implementation team might want to make if they have
time, it didn't look like the Tournament class was allowing parallel games
to be run (the BinaryGame class wasn't Runnable, and Tournament seemed to
simply iterate over all the players and start a game between then in
sequence.)  I know we discussed making the games parallel in their own
threads, so if the implementation team has time this might be a nice
enhancement.  However, we're so far along in the semester this might not be
a worthwhile change to make, since we'll be doing some test runs on
Wednesday evening.  I just wanted to bring it to your attention in case you
have some extra time.

Cheers,
Rick & Greek Gods
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs5500 mailing list