From: Dr. M. B. <dr....@t-...> - 2014-09-04 15:42:01
|
HI Stefan, yes that would be easiest, but in the moment we have the following diverging approaches: MapHex.java: private final BooleanState isBlockedForTileLays = BooleanState.create(this, "isBlockedForTileLays"); private String reservedForCompany = null; We set the first one from PrivateCompany. The second one is read from Map.xml... So right now Map.xml and CompanyManager.xml need to carry Information, thats "interesting" :) By relying on the first state we have no chance of seeing the owner of that hex we only know its blocked. Now linking those blocking and unblocking methods to the reservedForCompany String, will be possible (and dangerous for existing games ?). Currently there is no check if a given Private blocks a hex: theres just the Call boolean maphex.isBlockedForTileLays(). Maybe we should/can change that BooleanState into a StringState isBlockedForTileLays with the Company being set as value ? Whats your opinion, how dangerous might that be to the existing games for reloading ? Btw reservedForCompany is just used for decoration right now, shouldnt we have that set from the blocking Hex code out of CompanyManager.xml as well ?? REgards, martin Am 04.09.14 um 17:17 schrieb Stefan Frey: > Martin: > it seems the easiest solution is to adjust the method that checks if > the Private blocks the hex to be parameterised with the operating > company. > There you are able to check if both private and operating companies > have the identical owner. > This avoids to block or unblock the hex itself. > In the XML definition of the private you could add something like > exceptOwner in the XML tag that defines hex blocking. > I think it is simple and general enough to be included into the main > code without requiring further examples. > Stefan > > > > > "Dr. Martin Brumm" <dr....@t-...>schrieb: > > Hi, > > the private companies in 1837 have the power to block access to their > hexes to anyone but the owner and the companies that the owner is > controlling, without the companies having to buy in the privates. > > Currently the blocking hex state will be lifted when the private > company > is bought in by a major company. > > The special ability of the privates in 1837 are twofold, they should > lift the blocking (which they currently dont) and they should > level the > building cost (which they do). > > So question to the group on how to proceed here ? Are there any other > games out there with the behaviour of the privates alike to 1837 ? or > are all other privates which do block hexes from the type of the > 1830-privates ? > > I dont really see a way in the moment to temporarly lift the > blocking of > the hex during a major company action and have it reblock > everything again. > So building up a new map for the MapHexes that keeps track of the > blocker ? And if that is preparing a tile lay ignore the blocked > maphex ? > > What do you guys think or did i miss anything ? > > Regards, > Martin > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |