From: Stefan F. <ste...@we...> - 2011-07-08 07:51:39
|
Erik: To solve the issue of the location I would simply add a location field to the SpecialRights class and initialize that from XML. I am not an expert on those special properties etc., but it seems that only store the rights inside PublicCompany classes to be able to show it in the UI. For the revenue calculation there is no need this could be replaced by allowing to figure out the owner of the special property from inside (e.g. adding a field owner) and adding a boolean field purchased. Stefan On Thursday, July 07, 2011 10:19:21 am Erik Vos wrote: > Thanks, Stefan. > > > A) Reading the rules carefully it seems that the rights are only required > > for > > > the revenue train run, not for tracing a route for tile and token laying. > > Do all > > > agree on this? > > I would agree, but that's more because of the simplicity of interpreting > the rules this way than that I'm any sort of rules expert.... > > > B) Suprisingly (to me at least) SpecialRights has to no location field, > > thus I had > > > to hardcode the coalfield hex location. On the other hand I did not know > > what to do with fields rightValue and rightDefaultValue. > > Ah, good point. > I had created Rights as a map so it could be used for more complex cases, > but the value is currently unused and remains null. > Would it help to use the location name as the value of this right? Any > other ideas? > > In addition: would it be useful to give this hex (or HexStation) a special > type once we have implemented that new concept? > Here we could reuse type "mine", because that's a pretty generic type that > occurs in several games. > > > C) The finishConfiguration method of SpecialProperties for a > > (Public)Company were not called. I added the missing call to the > > finishConfiguration of PublicCompany. I have not checked if this call is > > also > > > missing for PrivateCompany and/or should be better moved up to the > > Company class. > > OK, I'll have a look. Yesterday I had the same problem with Phase. > > finishConfiguration() is intended to be generic in all configurable > classes, but it's an afterthought and is so far only called where it is > really used (and apparently not even that!). > > > D) Personally I am not too happy that the main code parts of Rights > > (which > > in > > > my view is not a very general part of 18xx) are inside the main classes > > PublicCompany and OperatingRound, which are already difficult to > > understand and in my view have grown too large. > > Well, right. But otherwise specific OperatingRound_1830 and > PublicCompany_1830 classes would be needed to implement this feature, and I > found that a bit of overkill too. But it's still an option. Would you have > preferred that approach? The SpecialRight class would then also become > specific and be renamed to CoalfieldsRight or so. > > I have no idea in what other games we could use Rights. As I have named it, > it's very generic and could perhaps be employed in currently unexpected > ways. But I must admit that I can't give any example, so maybe you're > right. > > > But breaking up the Round > > classes has been on my agenda for long and I know that Erik is not happy > > about that idea neither ;-) > > That could be so because of my rusty brains, of course. It's not so that I > would run away if you started doing such things. But I think that it will > be (1) a hell of a lot of work, and (2) pretty dangerous. > > Erik. > > > > --------------------------------------------------------------------------- > --- All of the data generated in your IT infrastructure is seriously > valuable. Why? It contains a definitive record of application performance, > security threats, fraudulent activity, and more. Splunk takes this data > and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |