From: Erik V. <eri...@xs...> - 2011-05-08 20:34:43
|
Van: Dr....@t-... [mailto:Dr....@t-...] i am currently looking into linking the stockmarket position into the revenue calculation. And i admit i got lost in the process how Rails currently tries to calculate and setup the dividends. I "think" the process gets started in the ORUIManager and from there ends up in OperatingRound.java not without to touch a number of action classes and PublicCompany.java.. :) Yes, the revenue is currently calculated and/or manually entered in the UI. I don’t know if this will stay so, but that’s how it currently works. I’m not at all familiar with that code. It has been developed by Stefan Frey, who has not been active during the past months. Hopefully he will return. Where would you suggest to add a hook to determine the stockposition and the derived revenuebonus ? It shouldnt go into RevenueCalculator as that Class is based on the available trains... Or ? Any bonuses should be added in the revenue calculation algorithms (or added manually). I suppose you are referring to the +5, +10 etc. indicators in the Stock Chart? This can be made configurable by adding an attribute like ‘bonus=”50”’, ‘bonus=”100”’ etc. to the relevant stock chart cells in the XML, and to add a getRunBonus() getter to make it retrievable. I have no problem calling this from the UI, as it is static information. And I also see no problem making this generic, as it’s just one atrtribute and a few lines of code. Other bonuses may need special code, unless Stefan has already created standard ways to do this. I’m afraid I will have to refer to him for now. And while i am at it: Do you have any idea/clue for me how to handle the jump from an OR to the Stockround after a "train rush"/rust ? Would the PrussionFormationRound mechanismn be a possible path to follow ? Cause honestly i am still trying to find my way between the different handling ways and actions in the different Parts :) Exactly. In a GameManager subclass you should suppress the usual SR/OR sequence, running just OR’s forever. And the Prussian formation round initiation in OperatingRound_1835.newPhaseChecks() is probably a very good example for how to initiate stock rounds in 1880. Erik. Van: Dr....@t-... [mailto:Dr....@t-...] Verzonden: zondag 8 mei 2011 17:56 Aan: Erik Vos Onderwerp: Stockmarket Permanent Revenue 1880 Hi Erik, i am currently looking into linking the stockmarket position into the revenue calculation. And i admit i got lost in the process how Rails currently tries to calculate and setup the dividends. I "think" the process gets started in the ORUIManager and from there ends up in OperatingRound.java not without to touch a number of action classes and PublicCompany.java.. :) Where would you suggest to add a hook to determine the stockposition and the derived revenuebonus ? It shouldnt go into RevenueCalculator as that Class is based on the available trains... Or ? And while i am at it: Do you have any idea/clue for me how to handle the jump from an OR to the Stockround after a "train rush"/rust ? Would the PrussionFormationRound mechanismn be a possible path to follow ? Cause honestly i am still trying to find my way between the different handling ways and actions in the different Parts :) Regards, Martin |