From: Stefan F. (web.de) <ste...@we...> - 2010-05-18 22:24:03
|
Again some more results from working on Rails during train rides: I added the RevenueManager and the RevenueStaticModifier in Rails. By those 18Kaas is fully supported and in 1856 Bonus the bonus tokens are implemented (1856 still misses the support to allow run through the Gooderich tile). Some details: -> RevenueManager A new component similar to the ones like TrainManager, CompanyManager. This is the only permanent object related to the revenue calculation and stores the revenue modifiers. -> RevenueStaticModifier This is a (simple) Interface, that requires the implementation of one method: public void modifyCalculator(RevenueAdapter revenueAdapter) This method allows to manipulate all elements for the revenue calculation via the public methods defined for the revenue adapater. This allows to create e.g. new vertices, change values of vertices, define additional RevenueBonuses or vertex sets. Current company and phase are also available. The method is called each time a revenue adapter was created and populated from Rails object, but before the revenue calculation occurs. For this it has to register itself to the RevenueManager via its addStaticModifier() method. Both the RevenueManager and game specific RevenueModifiers can be defined in Game.xml. Example Definition in Game.xml for 18Kaas: <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> <StaticModifier class="rails.game.specific._18Kaas.RuhrRevenueModifier" /> </Component> Modifiers defined in that fashion are already registered, thus they do not need to call addStaticModifier(). -> Bonus implements RevenueStaticModifier The Rails class Bonus, which represents an actual Bonus on a hex (exactly what was neeeded!), implements the modifier above and converts the Rails Bonus into a RevenueBonus in the calculator. An issue here: Due to a typo in LocatedBonus and SellBonusToken prevented the call to finishConfiguration (GameManagerI gameManager) and thus the location variable in Bonus was never parsed. An side effect of that fix that in the OR window of 1856 the bonus tokens are shown not a s Tunnel and Bridge token, but by their location codes. I do not know, what users prefer? Stefan |
From: Phil D. <de...@gm...> - 2010-05-19 12:53:03
|
Hmm, not sure what the majority of people would prefer but I think it would be nice to clearly show that a given location has received a bonus for a token. I'm not sure most people care what or where the token came from, particularly in 1856 they are usually fairly obvious anyway. Phil On 18 May 2010 23:23, Stefan Frey (web.de) <ste...@we...> wrote: > Again some more results from working on Rails during train rides: > > I added the RevenueManager and the RevenueStaticModifier in Rails. > By those 18Kaas is fully supported and in 1856 Bonus the bonus tokens are > implemented (1856 still misses the support to allow run through the Gooderich > tile). > > Some details: > > -> RevenueManager > A new component similar to the ones like TrainManager, CompanyManager. > This is the only permanent object related to the revenue calculation and > stores the revenue modifiers. > > -> RevenueStaticModifier > This is a (simple) Interface, that requires the implementation of one method: > public void modifyCalculator(RevenueAdapter revenueAdapter) > > This method allows to manipulate all elements for the revenue calculation via > the public methods defined for the revenue adapater. This allows to create > e.g. new vertices, change values of vertices, define additional > RevenueBonuses or vertex sets. Current company and phase are also available. > > The method is called each time a revenue adapter was created and populated > from Rails object, but before the revenue calculation occurs. > For this it has to register itself to the RevenueManager via its > addStaticModifier() method. > > Both the RevenueManager and game specific RevenueModifiers can be defined > in Game.xml. > > Example Definition in Game.xml for 18Kaas: > > <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> > <StaticModifier class="rails.game.specific._18Kaas.RuhrRevenueModifier" /> > </Component> > > Modifiers defined in that fashion are already registered, thus they do not > need to call addStaticModifier(). > > -> Bonus implements RevenueStaticModifier > The Rails class Bonus, which represents an actual Bonus on a hex (exactly what > was neeeded!), implements the modifier above and converts the Rails Bonus > into a RevenueBonus in the calculator. > > An issue here: > Due to a typo in LocatedBonus and SellBonusToken prevented the call to > finishConfiguration (GameManagerI gameManager) > and thus the location variable in Bonus was never parsed. > An side effect of that fix that in the OR window of 1856 the bonus tokens are > shown not a s Tunnel and Bridge token, but by their location codes. I do not > know, what users prefer? > > Stefan > > ------------------------------------------------------------------------------ > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2010-05-19 19:03:39
|
I think it was John David Galt's request to add token abbreviations ("Br" en "Tu" in 1856). I'd appreciate his opinion. I'm fine with the location names. People might find names easier, but names can only be applied to fixed-location bonuses anyway. Erik. -----Original Message----- From: Phil Davies [mailto:de...@gm...] Sent: Wednesday 19 May 2010 14:53 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] RevenueManager and RevenueStaticModifier Hmm, not sure what the majority of people would prefer but I think it would be nice to clearly show that a given location has received a bonus for a token. I'm not sure most people care what or where the token came from, particularly in 1856 they are usually fairly obvious anyway. Phil On 18 May 2010 23:23, Stefan Frey (web.de) <ste...@we...> wrote: > Again some more results from working on Rails during train rides: > > I added the RevenueManager and the RevenueStaticModifier in Rails. > By those 18Kaas is fully supported and in 1856 Bonus the bonus tokens are > implemented (1856 still misses the support to allow run through the Gooderich > tile). > > Some details: > > -> RevenueManager > A new component similar to the ones like TrainManager, CompanyManager. > This is the only permanent object related to the revenue calculation and > stores the revenue modifiers. > > -> RevenueStaticModifier > This is a (simple) Interface, that requires the implementation of one method: > public void modifyCalculator(RevenueAdapter revenueAdapter) > > This method allows to manipulate all elements for the revenue calculation via > the public methods defined for the revenue adapater. This allows to create > e.g. new vertices, change values of vertices, define additional > RevenueBonuses or vertex sets. Current company and phase are also available. > > The method is called each time a revenue adapter was created and populated > from Rails object, but before the revenue calculation occurs. > For this it has to register itself to the RevenueManager via its > addStaticModifier() method. > > Both the RevenueManager and game specific RevenueModifiers can be defined > in Game.xml. > > Example Definition in Game.xml for 18Kaas: > > <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> > <StaticModifier class="rails.game.specific._18Kaas.RuhrRevenueModifier" /> > </Component> > > Modifiers defined in that fashion are already registered, thus they do not > need to call addStaticModifier(). > > -> Bonus implements RevenueStaticModifier > The Rails class Bonus, which represents an actual Bonus on a hex (exactly what > was neeeded!), implements the modifier above and converts the Rails Bonus > into a RevenueBonus in the calculator. > > An issue here: > Due to a typo in LocatedBonus and SellBonusToken prevented the call to > finishConfiguration (GameManagerI gameManager) > and thus the location variable in Bonus was never parsed. > An side effect of that fix that in the OR window of 1856 the bonus tokens are > shown not a s Tunnel and Bridge token, but by their location codes. I do not > know, what users prefer? > > Stefan > > ---------------------------------------------------------------------------- -- > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > ---------------------------------------------------------------------------- -- _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. (web.de) <ste...@we...> - 2010-05-19 21:22:57
|
Erik & Phil: I did not change anything intentionally. It is only that my bug fix had the side effect on the toString method for the various BonusTokens. Previously the location variable was not initialized thus it fell back to the name. This brings me back to something else: I am currently experimenting into how to communciate the bonuses in the revenue pop-up message. At the moment it gives more information as needed (to allow easier debugging). Later it might be more compact: E.g. in 18Kaas Ruhr (20+40+30). And to ask that here: What should be the default: Should Ruhr double the value of both cities and towns or only cities? And another question: What is your opinion on the pop-up messages? Should this be kept active in the next release? And another one: I have implemented that if the Bonus close method is called, it is unregistered from the call list of the RevenueManager. Are there other cases, when the Bonus gets invalid? Stefan On Wednesday 19 May 2010 21:03:31 Erik Vos wrote: > I think it was John David Galt's request to add token abbreviations ("Br" > en "Tu" in 1856). I'd appreciate his opinion. > I'm fine with the location names. People might find names easier, but names > can only be applied to fixed-location bonuses anyway. > > Erik. > > -----Original Message----- > From: Phil Davies [mailto:de...@gm...] > Sent: Wednesday 19 May 2010 14:53 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] RevenueManager and RevenueStaticModifier > > Hmm, not sure what the majority of people would prefer but I think it > would be nice to clearly show that a given location has received a > bonus for a token. I'm not sure most people care what or where the > token came from, particularly in 1856 they are usually fairly obvious > anyway. > > Phil > > On 18 May 2010 23:23, Stefan Frey (web.de) <ste...@we...> wrote: > > Again some more results from working on Rails during train rides: > > > > I added the RevenueManager and the RevenueStaticModifier in Rails. > > By those 18Kaas is fully supported and in 1856 Bonus the bonus tokens are > > implemented (1856 still misses the support to allow run through the > > Gooderich > > > tile). > > > > Some details: > > > > -> RevenueManager > > A new component similar to the ones like TrainManager, CompanyManager. > > This is the only permanent object related to the revenue calculation and > > stores the revenue modifiers. > > > > -> RevenueStaticModifier > > This is a (simple) Interface, that requires the implementation of one > > method: > > public void modifyCalculator(RevenueAdapter revenueAdapter) > > > > This method allows to manipulate all elements for the revenue calculation > > via > > > the public methods defined for the revenue adapater. This allows to > > create e.g. new vertices, change values of vertices, define additional > > RevenueBonuses or vertex sets. Current company and phase are also > > available. > > > The method is called each time a revenue adapter was created and > > populated from Rails object, but before the revenue calculation occurs. > > For this it has to register itself to the RevenueManager via its > > addStaticModifier() method. > > > > Both the RevenueManager and game specific RevenueModifiers can be defined > > in Game.xml. > > > > Example Definition in Game.xml for 18Kaas: > > > > <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> > > <StaticModifier > > class="rails.game.specific._18Kaas.RuhrRevenueModifier" /> > > > </Component> > > > > Modifiers defined in that fashion are already registered, thus they do > > not need to call addStaticModifier(). > > > > -> Bonus implements RevenueStaticModifier > > The Rails class Bonus, which represents an actual Bonus on a hex (exactly > > what > > > was neeeded!), implements the modifier above and converts the Rails Bonus > > into a RevenueBonus in the calculator. > > > > An issue here: > > Due to a typo in LocatedBonus and SellBonusToken prevented the call to > > finishConfiguration (GameManagerI gameManager) > > and thus the location variable in Bonus was never parsed. > > An side effect of that fix that in the OR window of 1856 the bonus tokens > > are > > > shown not a s Tunnel and Bridge token, but by their location codes. I do > > not > > > know, what users prefer? > > > > Stefan > > --------------------------------------------------------------------------- >- -- > > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > --------------------------------------------------------------------------- >- -- > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > --------------------------------------------------------------------------- >--- > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Phil D. <de...@gm...> - 2010-05-20 10:11:56
|
On 19 May 2010 22:22, Stefan Frey (web.de) <ste...@we...> wrote: > Erik & Phil: > I did not change anything intentionally. > It is only that my bug fix had the side effect on the toString method for the > various BonusTokens. Previously the location variable was not initialized > thus it fell back to the name. > > This brings me back to something else: > I am currently experimenting into how to communciate the bonuses in the > revenue pop-up message. At the moment it gives more information as needed (to > allow easier debugging). Later it might be more compact: E.g. in 18Kaas Ruhr > (20+40+30). > > And to ask that here: What should be the default: Should Ruhr double the value > of both cities and towns or only cities? Does anyone own a copy of the physical version? The rules seem to be sorely lacking on BGG and on the 18XX list, the general consensus seems to be that it doubles cities only (and that's how we play) but no doubt someone is going to come back with an alternative they prefer > And another question: > What is your opinion on the pop-up messages? Should this be kept active in the > next release? I kind of like the popup, although popup messages that block the other windows from interaction can get annoying sometimes, I don't think it's a big deal in this case. For open games with something like a Diesel you might need to think about cutting the message box text down. In the last game of 1856 I ran through, the late game Diesel run popup was wider than my screen resolution! > And another one: > I have implemented that if the Bonus close method is called, it is > unregistered from the call list of the RevenueManager. Are there other cases, > when the Bonus gets invalid? > > Stefan > > > On Wednesday 19 May 2010 21:03:31 Erik Vos wrote: >> I think it was John David Galt's request to add token abbreviations ("Br" >> en "Tu" in 1856). I'd appreciate his opinion. >> I'm fine with the location names. People might find names easier, but names >> can only be applied to fixed-location bonuses anyway. >> >> Erik. >> >> -----Original Message----- >> From: Phil Davies [mailto:de...@gm...] >> Sent: Wednesday 19 May 2010 14:53 >> To: Development list for Rails: an 18xx game >> Subject: Re: [Rails-devel] RevenueManager and RevenueStaticModifier >> >> Hmm, not sure what the majority of people would prefer but I think it >> would be nice to clearly show that a given location has received a >> bonus for a token. I'm not sure most people care what or where the >> token came from, particularly in 1856 they are usually fairly obvious >> anyway. >> >> Phil >> >> On 18 May 2010 23:23, Stefan Frey (web.de) <ste...@we...> wrote: >> > Again some more results from working on Rails during train rides: >> > >> > I added the RevenueManager and the RevenueStaticModifier in Rails. >> > By those 18Kaas is fully supported and in 1856 Bonus the bonus tokens are >> > implemented (1856 still misses the support to allow run through the >> >> Gooderich >> >> > tile). >> > >> > Some details: >> > >> > -> RevenueManager >> > A new component similar to the ones like TrainManager, CompanyManager. >> > This is the only permanent object related to the revenue calculation and >> > stores the revenue modifiers. >> > >> > -> RevenueStaticModifier >> > This is a (simple) Interface, that requires the implementation of one >> >> method: >> > public void modifyCalculator(RevenueAdapter revenueAdapter) >> > >> > This method allows to manipulate all elements for the revenue calculation >> >> via >> >> > the public methods defined for the revenue adapater. This allows to >> > create e.g. new vertices, change values of vertices, define additional >> > RevenueBonuses or vertex sets. Current company and phase are also >> >> available. >> >> > The method is called each time a revenue adapter was created and >> > populated from Rails object, but before the revenue calculation occurs. >> > For this it has to register itself to the RevenueManager via its >> > addStaticModifier() method. >> > >> > Both the RevenueManager and game specific RevenueModifiers can be defined >> > in Game.xml. >> > >> > Example Definition in Game.xml for 18Kaas: >> > >> > <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> >> > <StaticModifier >> >> class="rails.game.specific._18Kaas.RuhrRevenueModifier" /> >> >> > </Component> >> > >> > Modifiers defined in that fashion are already registered, thus they do >> > not need to call addStaticModifier(). >> > >> > -> Bonus implements RevenueStaticModifier >> > The Rails class Bonus, which represents an actual Bonus on a hex (exactly >> >> what >> >> > was neeeded!), implements the modifier above and converts the Rails Bonus >> > into a RevenueBonus in the calculator. >> > >> > An issue here: >> > Due to a typo in LocatedBonus and SellBonusToken prevented the call to >> > finishConfiguration (GameManagerI gameManager) >> > and thus the location variable in Bonus was never parsed. >> > An side effect of that fix that in the OR window of 1856 the bonus tokens >> >> are >> >> > shown not a s Tunnel and Bridge token, but by their location codes. I do >> >> not >> >> > know, what users prefer? >> > >> > Stefan >> >> --------------------------------------------------------------------------- >>- -- >> >> > _______________________________________________ >> > Rails-devel mailing list >> > Rai...@li... >> > https://lists.sourceforge.net/lists/listinfo/rails-devel >> >> --------------------------------------------------------------------------- >>- -- >> >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel >> >> >> --------------------------------------------------------------------------- >>--- >> >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |