From: Erik V. <eri...@xs...> - 2011-08-09 21:18:23
|
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. 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. 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. 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. Erik. |