From: Erik V. <eri...@xs...> - 2012-01-22 23:09:38
|
Hi Martin, A few comments (just from looking at your code changes to generic classes. I haven’t tested anything yet): 1. Patch line 291: please don’t use static variables to represent dynamic and game-instance dependent data. We want to be prepared to process multiple game instances in one program instance. 2. Patch line 341: can’t the constant ‘CAPITALISE_FIFTY_PERCENT’ better be replaced by the more generic ‘CAPITALISE_PERCENTAGE’ with an additional numeric attribute that states the percentage? 3. I really wonder why you think you need an extra method PublicCompanyI.getNumberOfTileLays() with an additional company argument. A company knows its own identity and name, doesn’t it? So why pass that identity another time? 4. Patch lines 416-421: you shouldn’t include 1880-specific code into the generic Round class the way you do here. I don’t want to see references to 1880 and Shanghai in this class. If you can’t find a way to reformulate this in a generic way, you can always override floatCompany() in StockRound_1880. 5. Patch lines 644-648: similar comment as point 2. I believe we have discussed this before. 6. BuyStartItem: why add a new boolean method isSharePriceToSet() if we already have the identical hasSharePriceToSet()? And why can’t the whole Building Rights code be included in BuyStartItem_1880, which you have created anyway, instead of polluting BuyStartItem with that? 7. Similarly, why can’t the whole par slots code be included into StockMarket_1880? Apologies for being critical, but I really feel you are putting too many 1880 specials into generic code. Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Sunday, January 22, 2012 7:48 PM To: Rails Development Subject: [Rails-devel] Push request: 1880 code update Hello Eric, Brett, Stefan et al. please find the current status of 1880 specific code in the attachment. I would like to ask you to review the code and push it to the master or a branch as you see fit. If theres anything that needs changed please dont hesitate to either apply the changes or point me in the right direction. Fixed Tile definition for Tile 235 1880 Implemented Roundmechanismn for Stock and Operation Rounds. Fixed Typo in TileColour for extra permanent Tilelay of BCR Added tile235.svg it apparently got lost somehow in the first transmission. Removed wrong configuration point 1826 TGV modifier Reverse Commit of Trainmanager. action has been moved to OperatingRound_1880 1880: Overriding newPhaseChecks() from OperatingRound Overriding resume() from OperatingRound Overriding process() from OperatingRound The Stockround should now begin if trains trigger a phase change and if noone buys a train for a complete Round. Trains of the last active type will be made unavailable. Creating a method to remove all trains from the bank portfolio 1880: Creating and introducing GameManager_1880 class 1880: Changing finishGame to protected to be able to call it from subclasses. 1880: Introducing GameManager_1880 Class 1880: Make finishGame visible in a GameManager Subclass by changing it to protected instead of private. This is needed in the moment if theres no game specific finish game procedure. 1880: Initialising a string which otherwise might lead to a problem. 1880: Start of implementation of the Operating Round; Making sure that the BCR is allowed to lay 2 yellow tiles even in the first phase. Creating and implementing an interface in PublicCompanyI & PublicCompany to allow a search for the number of tiles a specific company is allowed to lay in a Phase. Fixed Company Listing in CompanyManager.xml Implemented Use of Capitalisation Rule 1880 Additions Startound is now playable. Caveat: Mechanismn in the moment not specific for the only Starting Paper of 1880 but generic implementation. The BCR is always a 20% Starting Paper so we dont need to adjust the portfolio there, but it can choose from the whole spectrum of building right. Modifications to StartRoundWindow and BuyStartItem to allow access to certain variables. Next Step: -introduction of StockRoundWindow_1880. -update of StatusWindow_1880 to incoporate the buildingrights into display. Modifications to StartRoundWindow and BuyStartItem to allow access to certain variables. Next Step: -introduction of StockRoundWindow_1880. -update of StatusWindow_1880 to incoporate the buildingrights into display. 1880: - Changes based on the PhaseAction Mechanismn that Erik introduced recently -PublicCompany_1880 now has the ability to set the Floating Percentage this is used in 1880 and might be used in combination with checkFlotation() if introduced into PublicCompanyI or via the PhaseAction -added the Capitalisation Method of 1880 to PublicCompany. just to make sure somebody else knows about that concept. - implemented the CommunistPhase and its Stockmarket handling. rails/game/Company.java: Fixed Spelling Error in Comment Changes to StockSpace and StockMarket to incorporate the additional revenues on the Stocktableau Preparing steps to incorporate the building rights for public companies. preparing Steps to generate a Subclass for StartRoundWindow. The following files have been changed: data/1880/Tiles.xml tiles/TileDictionary.xml tiles/svg/tile235.svg rails/game/specific/_1880/GameManager_1880.java rails/game/specific/_1880/OperatingRound_1880.java rails/game/specific/_1880/PublicCompany_1880.java data/1880/Game.xml rails/game/GameManager.java rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java rails/game/PublicCompany.java rails/game/PublicCompanyI.java data/1880/CompanyManager.xml rails/game/Round.java rails/game/specific/_1880/StockRound_1880.java rails/game/action/BuyStartItem.java rails/game/specific/_1880/BuyStartItem_1880.java rails/ui/swing/StartRoundWindow.java LocalisedText.properties rails/game/StockMarket.java rails/game/StockMarketI.java rails/game/StockSpace.java rails/game/StockSpaceI.java rails/game/StockSpaceType.java rails/game/StockSpaceTypeI.java There is still a few things to do for 1880 to become fully playable: Minor Companies need to get automatic trains to support Revenue finding Minor Companies need to get Shares Mechanismn to close Minor Companies upon reaching their destination Modification of share handling taking care of the fact that only 50% are initially avail until the first 3 train has been purchased. Modification of share portfolio (20,30,40%) president shares Making sure that the building right is used in operational moves (layTile Action). Making the different UIs( StartRoundWindow, StockRoundWindow) aware of the seating order Change) Make the par slot mechanismn active (Operation order of companies is fixed during ORS/dynamically after a Stockround) And the most problematic of all: Make the game aware of seating order changes, currently a changed seating order prevents the game from loading any save files after that change. (This is of course also the case for 1853 or any other game that determines the seating order after game setup). Regards, Martin |