From: Stefan F. (web.de) <ste...@we...> - 2010-05-01 21:08:09
|
Erik: The difference is minor: You define the station types first and then define the properties by coding methods that check the types, I would define the properties first and then define station types accordingly. As I think we are going in circles here, I will use your solution to keep the peace ;-) What is your suggestion then to model the off-board stations in 18Scan, where only the token-owner can run to? "Off-board destinations"? Kiruna is a (standard) town on a off-board map tile, that is simple. Stefan On Saturday 01 May 2010 22:21:34 Erik Vos wrote: > Another extension allows the pattern: > slots = 0 => always run through > slots = -1 => never run through (as standard off-map areas) > > [EV] Not needed. Normal off-board areas have an OffMapCity type station, > which should have the not-run-through property built in. > But here we were talking about City type stations. > > I personally favor defining more variables and prefer not encode several > dimensions into one variable. > > [EV] Agreed, but, as said, that was not needed. > > In your defintion e.g. a Station is fully tokened if number of slots == > number of tokens or number of slots equals zero. > > In my definition a Station is fully tokened if (number of slots == numer of > tokens). I would first check if the station is fully tokened and then the > different booleans define what companies can if they have or have not an > own > > token. > > [EV] "Fully tokened" is not a very interesting property or state. > "Runnable-through" is what we are interested in. And my definitions are: > (a) a City type Station can be run through if there is at least one free > slot > (i.e. not "fully tokened") or the number of slots is zero. It is a variable > state. > (b) an OffMapCity type Station can never be run through. This is a fixed > property. > > > --------------------------------------------------------------------------- >--- _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |