From: Mark S. <mar...@gm...> - 2008-12-24 02:38:59
|
Erik, Yes.. the changes will make me happier. Tossing out constructors that no code uses is fine. I have not had a chance yet to check out your updates to see how well they work, but I hope to have some time over the holidays. No promises. My wife's parents are arriving from China for a visit on the 26th. As for finding the bugs "hours after the release"... Don't worry too much about that. That sort of stuff always happens. I will point out again that counting passes is a wrong way to do it. Each player object should know if it has passed, and the Player Manager object should summarize the passes for any routine that cares to know. But there may need to be a special sub-class of the PlayerManager class, called something like "AuctionManager" that will keep track of those players who have bid on something and are allowed into the auction. I wish you all Happy Holidays... Mark On Tue, Dec 23, 2008 at 3:41 PM, Erik Vos <eri...@hc...> wrote: > I have committed a bunch of changes to the code base. Most of these deal > with a more uniform handling of round initialization. This does not cause > any functional changes, but it does look a bit better, and it also might > help paving the way for better configurability of the sequence of rounds, > most of which is now hardcoded. Last but not least, I think it will please > Mark ;-) > > I have taken Jean's implicit hint and replaced GameManager.createRound() by > two new methods of the same name, which create Round objects via > one-argument and two-argument constructors, respectively. The one-argument > constructor is used by "top-level" rounds (start, stock, operating rounds > and 18EU's Final Minor Exchange Round), and pass the gameManager object > that > every round needs. The two-argument constructor is used by "subrounds", > which briefly interrupt a top-level round, and get the parent round object > in addition to the gameManager object. Existing subrounds are > TreasuryShareRound and ShareSelling round, both being SR-like steps in an > operating round. In a number of round classes I have also moved some > initialization code from the start() methods to the constructors. The > no-argument constructors are no longer used and have been removed (in Round > it is now private). > > I have fairly extensively tested the consequences of all these changes, and > while doing so I discovered and fixed a few long-standing bugs. > > The first and worst is, that in 18EU the Final Minor Exchange Round was > started immediately after the OR in which the first 5-train was bought, > rather than just before the next Stock Round (this makes a difference if > the > first 5-train is bought in an odd OR). Also, the first player to act was > not > the first but the last player buying a 5-train. > > It's unfortunate that I discovered these pretty serious bugs just hours > after Brett announced the release of the new version 1.0.6. > > A second problem existed in 1830-style start rounds, where in some (I think > rare) circumstances bidding (or rather: passing) would never end (perhaps > Mark is right in disliking pass counting - that is where it went wrong in > the case I found). > > For the rest the changes contain some cleanups and automatic > comment/annotation insertions by Eclipse. > > Happy holidays to all of you. > > Erik > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |