From: Stefan F. <ste...@we...> - 2011-08-10 05:46:27
|
See my comments below. As always the train not to run will chosen such that the revenue is optimized. If the president wants another choice he can adjust the revenue. Interestingly 18TN is one the games where one stockholder can point out a better route and enforces the president to use that. Seems that the rules are slightly contradicting here, however I would use the general approach here that the more specific rule (civil war with president choice) would have priority here. On Tuesday, August 09, 2011 11:18:30 pm Erik Vos wrote: > I have implemented: > > 1. Phase management step 4: <Phase> can now have an <Action> child with > (required) name and (optional) value attributes. > Each action causes gameManager.processPhaseAction (name, value) to be > called when that phase is activated. > GameManager in turn calls processPhaseAction(name, value) in the current > round. I do not need to remind you that I am not happy that the Round mechanisms get more complicated again. Is there really no solution possible that avoids putting phase mechanisms inside the rounds/gamemanager classes again? > > 2. This new feature is used to implement 18TN Civil War (except the revenue > calculation). > The new code is in OperatingRound_18TN (updated) and PublicCompany_18TN > (new). > The latter method has a civilWar BooleanState that is set and unset > according to the 18TN rules. This already works. Again OperatingRound ;-) So my solution will be that PublicCompany_18TN will implement a RevenueStaticModifier and will remove the shorter train I assume that you have implemented the rule that a company with only one train (thus zero revenue) has its token unmoved instead of going left. > > 3. To fully implement the 18TN rules, the CivilWar setting also requires > publicCompany.hasRoute() to return true. > This is a new stub that always returns true (and is not used anywhere else > yet). > I hope we will once be able to detect route existence in the game engine. Existence of a route checking is easy to implement and is on my todo-list. I will add that asap. > > Stefan, I trust you will now be able to finish 18TN completely by > implementing the effect of the Civil War on the revenue calculation. > > To check the company CivilWar status you could call its isCivilWar() method > directly , but from an architectural POV (client/server separation) it > would be preferable, if at all possible, to create an Observer > (ViewObject) per company to register at the ModelObject (=BooleanState) > via the company getCivilWar() method. No the push mechanism I use here is the RevenueStaticModifier (see above). > > Erik. > > > --------------------------------------------------------------------------- > --- uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |