From: Martin B. <dr....@t-...> - 2013-09-22 16:05:05
Attachments:
signature.asc
|
Hello Mike, et al. i found the problem, and its not that easy to fix without breaking lots and lots of things. For that reason i have incorporated Stefan, Erik and Brett to see how we can go on. 1880 is changing in Phase B1 the amount of yellow tiles available to be placed on the map for all mayor companies to 2. Currently the Class Phase is using a unique Map called tileLaysPerColour. This map gets adjusted for every Phase assuming that the Colours Change but not the Fact that the number of tilelays per colour might Change at a later stage in Game. (A least thats what i observed right now). I think we need a localised copy of tileLaysPerColur for each Phase, but of course can copy the contents of the previousPhase if no change is detected... But we will break every savegame if we fix that rails.game.phase.java. Of course we will have to create then a Phase_1880 class (with all constraints) and have to create specific Phases for all other games that change subsequently tileLaysPerColour in later Phase (going from 2 yellow to 1 or from 1 yellow to 2 (like 1880)). So how do we proceed here ? Regards, Martin P.s. I palced a quick Fix for our 1880 Problem in PublicCompany_1880, but just that--- |
From: Mike B. <com...@ip...> - 2013-09-22 16:43:19
|
Have you consider putting together a quick savegame conversion program to solve the problem? Of course, it would not be an issue for games saved using the fixed version, because that would be part of the fix requirements. Sometimes brute force is the simplest solution. Mike Bourke Campaign Mastery http://www.campaignmastery.com Co-author, Assassin's Amulet http://www.legaciescampaignsetting.com |
From: Chris S. <chr...@gm...> - 2013-09-22 18:31:29
|
This fix will also be needed for 1853, where companies can lay 1 or 2 yellow depending on decision and phase. It would be nice if the code supported this game also. Rules are at http://lookout-spiele.de/wp-content/uploads/EN-1853_V3.pdf and this is the relevant text: In the first Operating Round of a Major Company (Companies 1-4, and possibly also Company 5, REF 2.6) the Director of the Company must choose one of the following alternatives: 1. The right to lay two tiles in a Operating Round does not come into effect until Phase 2. 2. The right to lay two tiles in a Operating Round is gained immediately but must be paid for whenever it is used. If this option is taken, whenever the Company lays two tiles in a Operating Round it pays the Bank at the following rates: • Company 1 - £50 • Companies 2, 3 & 4 (and Company 5 if it is a Major) - £20 -- Chris Please consider the environment before printing this e-mail. On Sun, Sep 22, 2013 at 9:43 AM, Mike Bourke <com...@ip...>wrote: > Have you consider putting together a quick savegame conversion program to > solve the problem? Of course, it would not be an issue for games saved > using > the fixed version, because that would be part of the fix requirements. > Sometimes brute force is the simplest solution. > > Mike Bourke > Campaign Mastery http://www.campaignmastery.com > Co-author, Assassin's Amulet http://www.legaciescampaignsetting.com > > > > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, > SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack > includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. > http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2013-09-22 18:42:26
|
Hello Martin, > I think we need a localised copy of tileLaysPerColur for each Phase, but of > course can copy the contents of the previousPhase if no change is > detected... That would be the normal fix indeed. > But we will break every savegame if we fix that rails.game.phase.java. Why exactly? Only the player moves are saved, and I don't immediately see why saved games would be broken, as long as no incorrect moves have been played that would be rejected after the fix. Erik |
From: Martin B. <dr....@t-...> - 2013-09-22 18:47:19
Attachments:
signature.asc
|
Am 22.09.2013 20:42, schrieb Erik Vos: > Hello Martin, > >> I think we need a localised copy of tileLaysPerColur for each Phase, but > of >> course can copy the contents of the previousPhase if no change is >> detected... > That would be the normal fix indeed. > >> But we will break every savegame if we fix that rails.game.phase.java. > Why exactly? Only the player moves are saved, and I don't immediately see > why saved games would be broken, as long as no incorrect moves have been > played that would be rejected after the fix. Hi Erik, maybe i missed something there then.. I'll give it a new attempt. > Erik > > > Martin |
From: Stefan F. <ste...@we...> - 2013-09-23 09:04:00
|
I agree with Erik, that there should not be an issue with save files, unless you break the mechanism of tileLays for the other games. TileLaysPerColour is never stored inside the save file. The best approach in Rails 1.x is to use the following method in GameManager: public void initialiseNewPhase(PhaseI phase); This allows to change tileLaysPerColour according to the new change. However do not forget to change tileLaysPerColour to a stateful variable, thus from a Map to a HashMapState in the Phase class, otherwise undo will not work correctly. Most likely method initFromMap(...) in HashMapState will be helpful. In Rails 2.0 there will be a new PhaseChangeInterface will be available to allow easier access to Phase changes, however it is not implemented so far. For 1853 I would wait to implement the requirements until we start coding for that game, as it seems that the tile lays conditions are quite specific to each game. But I might be wrong here. Stefan On 09/22/2013 08:42 PM, Erik Vos wrote: > Hello Martin, > >> I think we need a localised copy of tileLaysPerColur for each Phase, but > of >> course can copy the contents of the previousPhase if no change is >> detected... > > That would be the normal fix indeed. > >> But we will break every savegame if we fix that rails.game.phase.java. > > Why exactly? Only the player moves are saved, and I don't immediately see > why saved games would be broken, as long as no incorrect moves have been > played that would be rejected after the fix. > > Erik > > > |