From: Erik V. <eri...@xs...> - 2012-05-19 13:42:48
|
> -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Saturday, May 19, 2012 1:46 PM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] 1837 Revenue Calculation > > Erik: > if I remember correctly we only agreed to disagree on this issue. I cannot > prevent you from you creating new attributes for the xml-files, but I cannot > guarantee to write the supporting code for the revenue algorithm. > > A VertexVisitSet is a base element of the revenue calculation algorithm: > It covers all cases in which from a set of nodes/vertices only one member can > be path of a single train run. It covers not only visiting the stations from the > same hex twice, but also prevents running into multi-hex offboard hexes > several times and is used in conjunction with some of the bonus mechanisms > where only one bonus can be scored by a single train. > > If you have a better name for that I can use it throughout the program. > However I am reluctant to introduce a different terminology in the XML files > than in the program code for same mechanism. I can't provide a better name because I have no clue what the range of values and their meaning would be. But wouldn't we mix up functional and technical specification by mentioning such technical stuff into the XML? I probably wouldn't understand much of it, and would even less be able to explain it to others, so we would have to involve you anyway each time a new game gets set up. Terms like "runThrough", "loop" etc. I can understand and explain, but your route/revenue algorithms are beyond my horizon. > I understand that is good approach to limit t those cases where we have to > define handmade tile.xml definitions, but I do doubt that this will be possible > for all of them: There will be still Goderich and other tiles remaining, that > require that. It seems that taking HandMadeTiles.xml into account during the > creation of Tiles.xml is unavoidable. In fact I wonder if that is the main reason > why the Goderich bug creeps in again and again. I think there is a simple solution for each of the existing uses of HandmadeTiles.xml. 1. Goderich: as I said, this has already been persistently fixed in another way, i.e. by using different internal and external tile IDs. Goderich and Hamburg now have tile ID=-903 (i.e. a normal 3-way offboard tile) with <Access runThrough="yes"/>. Tile ID -939 is now used as an image only; it no longer exists in the Tiles.xml files of these games. As far as I have been able to test, this works. 2. The per-station 'city' attribute: can equally well be moved to TileSet.xml, provided that the attribute name is changed, e.g. to just 'name', although that would be an equally bad description of the purpose of this attribute. For the existing uses, I think 'mutexID' would be more descriptive, but that would not well cover your proposed usage in the 1837 ZKB tile. In any case, it would still be returned by station.getCityName(), so you would not be affected. Indeed another approach, perhaps to be implemented later, could be to replace it by vertexWhatever, if that and its values can be named so to be understandable to mortals like me. 3. The per-tile 'name' attribute (used for the 1825 water tiles and half-tiles to tweak the TD-provided name for use in some labels): any overrides can as well be added to TileSet.xml. With these fairly simple measures, there is no more need for HandmadeTIles.xml. > * Replace the implicit name convention for creating VertexVisitSets by an > explicit mechanism. Details have to be discussed and agreed on. Well, for now I can't provide any input to such a discussion, except by stating that both name and values should be either easily understandable or well documented. Erik. |