From: Stefan F. <ste...@we...> - 2014-09-05 06:46:09
|
<html> <head> </head> <body>I will delay for a further day, as I will only return on Saturday. Change of plans. ;-)<br> <br><br><div class="gmail_quote"><br> <br> Michael Alexander <out...@gm...>schrieb:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div> I unfortunately had something come up. Don't wait for me. </div> <div class="gmail_extra"> <br/> <br/> <div class="gmail_quote"> On Thu, Sep 4, 2014 at 1:03 PM, Michael Alexander<span> <<a href="mailto:out...@gm..." target="_blank">out...@gm...</a>></span> wrote:<br/> <blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;"> <div> I can get it to a state where I can do that tonight. Thanks for the heads up. </div> <div class="HOEnZb"> <div class="h5"> <div class="gmail_extra"> <br/> <br/> <div class="gmail_quote"> On Thu, Sep 4, 2014 at 12:56 PM, Stefan Frey<span> <<a href="mailto:ste...@we..." target="_blank">ste...@we...</a>></span> wrote:<br/> <blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;"> Martin & Alexander:<br/> I have now rewritten a lot of the tile and token lay UI code and intend<br/> a new alpha tomorrow end-of-day.<br/> So if you would like to merge some code into rails_2_develop, there is<br/> some time left to do so.<br/> Good coding,<br/> Stefan<br/> <br/> ------------------------------------------------------------------------------<br/> Slashdot TV.<br/> Video for Nerds. Stuff that matters.<br/> <a href="http://tv.slashdot.org/" target="_blank">http://tv.slashdot.org/</a><br/> _______________________________________________<br/> Rails-devel mailing list<br/> <a href="mailto:Rai...@li..." target="_blank">Rai...@li...</a><br/> <a href="https://lists.sourceforge.net/lists/listinfo/rails-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/rails-devel</a><br/> </blockquote> </div> <br/> </div> </div> </div> </blockquote> </div> <br/> </div> ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters.<a href="http://tv.slashdot.org/_______________________________________________" target="_blank"> http://tv.slashdot.org/_______________________________________________</a> Rails-devel mailing list Rai...@li...<a href="https://lists.sourceforge.net/lists/listinfo/rails-devel" target="_blank"> https://lists.sourceforge.net/lists/listinfo/rails-devel</a> </blockquote></div></body> </html> |
From: Michael A. <out...@gm...> - 2014-09-07 00:54:41
|
I've pushed up my changes - I think I did it correctly, please let me know if I messed something up. I have the Parliament Round mostly working. My next step is to work on the stock market. On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey <ste...@we...> wrote: > I will delay for a further day, as I will only return on Saturday. Change > of plans. ;-) > > > > > Michael Alexander <out...@gm...>schrieb: >> >> I unfortunately had something come up. Don't wait for me. >> >> >> On Thu, Sep 4, 2014 at 1:03 PM, Michael Alexander < >> out...@gm...> wrote: >> >>> I can get it to a state where I can do that tonight. Thanks for the >>> heads up. >>> >>> >>> On Thu, Sep 4, 2014 at 12:56 PM, Stefan Frey <ste...@we...> >>> wrote: >>> >>>> Martin & Alexander: >>>> I have now rewritten a lot of the tile and token lay UI code and intend >>>> a new alpha tomorrow end-of-day. >>>> So if you would like to merge some code into rails_2_develop, there is >>>> some time left to do so. >>>> Good coding, >>>> Stefan >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 > > > > ------------------------------------------------------------------------------ > 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 > > |
From: Michael A. <out...@gm...> - 2014-09-07 03:42:57
|
And now that I'm looking at the stock market... I don't think I can use much of the existing Stock Market class for it. It just won't fit in a rectangle. I could make a new "Stock Market" class for this one and make the .xml file specify which one to use. Should I take that direction? Mike On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander <out...@gm...> wrote: > I've pushed up my changes - I think I did it correctly, please let me know > if I messed something up. > > I have the Parliament Round mostly working. My next step is to work on > the stock market. > > > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey <ste...@we...> wrote: > >> I will delay for a further day, as I will only return on Saturday. Change >> of plans. ;-) >> >> >> >> >> Michael Alexander <out...@gm...>schrieb: >>> >>> I unfortunately had something come up. Don't wait for me. >>> >>> >>> On Thu, Sep 4, 2014 at 1:03 PM, Michael Alexander < >>> out...@gm...> wrote: >>> >>>> I can get it to a state where I can do that tonight. Thanks for the >>>> heads up. >>>> >>>> >>>> On Thu, Sep 4, 2014 at 12:56 PM, Stefan Frey <ste...@we...> >>>> wrote: >>>> >>>>> Martin & Alexander: >>>>> I have now rewritten a lot of the tile and token lay UI code and intend >>>>> a new alpha tomorrow end-of-day. >>>>> So if you would like to merge some code into rails_2_develop, there is >>>>> some time left to do so. >>>>> Good coding, >>>>> Stefan >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> 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 >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> >> > |
From: Stefan F. <ste...@we...> - 2014-09-07 07:09:10
|
Mike: I will come up with a more detailed answer later today. I have not played 1862 yet, however from a short glance, it seems that the stock market is similar to the one of 1860. I would not recommend that path, instead please wait on my thoughts, if you do not mind ;-) Stefan On 09/07/2014 05:42 AM, Michael Alexander wrote: > And now that I'm looking at the stock market... > > I don't think I can use much of the existing Stock Market class for > it. It just won't fit in a rectangle. I could make a new "Stock > Market" class for this one and make the .xml file specify which one to > use. Should I take that direction? > > Mike > > > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > <out...@gm... <mailto:out...@gm...>> wrote: > > I've pushed up my changes - I think I did it correctly, please let > me know if I messed something up. > > I have the Parliament Round mostly working. My next step is to > work on the stock market. > > > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey <ste...@we... > <mailto:ste...@we...>> wrote: > > I will delay for a further day, as I will only return on > Saturday. Change of plans. ;-) > > > > > Michael Alexander <out...@gm... > <mailto:out...@gm...>>schrieb: > > I unfortunately had something come up. Don't wait for me. > > > On Thu, Sep 4, 2014 at 1:03 PM, Michael > Alexander<out...@gm... > <mailto:out...@gm...>> wrote: > > I can get it to a state where I can do that tonight. > Thanks for the heads up. > > > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > Frey<ste...@we... <mailto:ste...@we...>> > wrote: > > Martin & Alexander: > I have now rewritten a lot of the tile and token > lay UI code and intend > a new alpha tomorrow end-of-day. > So if you would like to merge some code into > rails_2_develop, there is > some time left to do so. > Good coding, > Stefan > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > <mailto:Rai...@li...> > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ------------------------------------------------------------------------------ > Slashdot TV. Video for Nerds. Stuff that > matters.http://tv.slashdot.org/_______________________________________________ > <http://tv.slashdot.org/_______________________________________________> > Rails-devel mailing list Rai...@li... > <mailto:Rai...@li...>https://lists.sourceforge.net/lists/listinfo/rails-devel > <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... > <mailto: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 |
From: Michael A. <out...@gm...> - 2014-09-07 07:18:15
|
Yes, it is extremely similar to 1860. It might be that the only difference is that the one in 1862 is longer at the high end. No hurry on the response, there are plenty of other things to do. On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we...> wrote: > Mike: > I will come up with a more detailed answer later today. > I have not played 1862 yet, however from a short glance, it seems that > the stock market is similar to the one of 1860. > I would not recommend that path, instead please wait on my thoughts, if > you do not mind ;-) > Stefan > > On 09/07/2014 05:42 AM, Michael Alexander wrote: > > And now that I'm looking at the stock market... > > > > I don't think I can use much of the existing Stock Market class for > > it. It just won't fit in a rectangle. I could make a new "Stock > > Market" class for this one and make the .xml file specify which one to > > use. Should I take that direction? > > > > Mike > > > > > > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > > <out...@gm... <mailto:out...@gm...>> wrote: > > > > I've pushed up my changes - I think I did it correctly, please let > > me know if I messed something up. > > > > I have the Parliament Round mostly working. My next step is to > > work on the stock market. > > > > > > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey <ste...@we... > > <mailto:ste...@we...>> wrote: > > > > I will delay for a further day, as I will only return on > > Saturday. Change of plans. ;-) > > > > > > > > > > Michael Alexander <out...@gm... > > <mailto:out...@gm...>>schrieb: > > > > I unfortunately had something come up. Don't wait for me. > > > > > > On Thu, Sep 4, 2014 at 1:03 PM, Michael > > Alexander<out...@gm... > > <mailto:out...@gm...>> wrote: > > > > I can get it to a state where I can do that tonight. > > Thanks for the heads up. > > > > > > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > > Frey<ste...@we... <mailto:ste...@we...>> > > wrote: > > > > Martin & Alexander: > > I have now rewritten a lot of the tile and token > > lay UI code and intend > > a new alpha tomorrow end-of-day. > > So if you would like to merge some code into > > rails_2_develop, there is > > some time left to do so. > > Good coding, > > Stefan > > > > > ------------------------------------------------------------------------------ > > Slashdot TV. > > Video for Nerds. Stuff that matters. > > http://tv.slashdot.org/ > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > <mailto:Rai...@li...> > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > ------------------------------------------------------------------------------ > > Slashdot TV. Video for Nerds. Stuff that > > matters. > http://tv.slashdot.org/_______________________________________________ > > < > http://tv.slashdot.org/_______________________________________________> > > Rails-devel mailing list Rai...@li... > > <mailto:Rai...@li...> > https://lists.sourceforge.net/lists/listinfo/rails-devel > > <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... > > <mailto: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 > > > > ------------------------------------------------------------------------------ > 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 > |
From: Stefan F. <ste...@we...> - 2014-09-08 16:38:42
|
Mike: below you find a proposal how to restructure StockMarket. This is an example how I would like to change other components of Rails in the longer run. Please feel free to comment. I will write a mail on 1862/1860 stock market specifics later. Stefan Suggestions for a component structure. Example: Stockmarket Currently the core parts of logic, data and creation for the Stockmarket is combined in one class: Stockmarket. A) Separation of Data and Logic The data parts of Stockmarket should be moved to a separate class (e.g. xxxMarketModel). Possible classes depend on the StockMarket: e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel The logic part replaces the existing StockMarket class and contains method called from Rails that operate on the StockMarket, e.g. payout, withhold, sharesSold, etc. Most likely there will be some default Markets, like RectangularMarket, HexagonalMarket or LinearMarket, but more specialized are possible. Customization should be possible in two ways: i) Internal configuration due to xml settings. ii) Implementing StrategyInterfaces that adjust part of the internal working of the default market. E.g. there could be a SoldOutStrategy interface, that allows to change how the market behaves if shares are sold out after a stock round. B) Move Creation to a Builder/Factory class (StockMarketFactory) Creation of the StockMarket is then done by a separate class, that wires together the different classes according of the needs of the specific 18xx. I prefer to use code to wire together Java elements, so no class names should appear in xml files. This allows easier refactoring and code optimizations. C) Roadmap I offer to create the basic components for 1830 according to the structure outlined above. Then other stockmarkets can be modelled along these lines. On 09/07/2014 09:18 AM, Michael Alexander wrote: > Yes, it is extremely similar to 1860. It might be that the only > difference is that the one in 1862 is longer at the high end. > > No hurry on the response, there are plenty of other things to do. > > On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... > <mailto:ste...@we...>> wrote: > > Mike: > I will come up with a more detailed answer later today. > I have not played 1862 yet, however from a short glance, it seems that > the stock market is similar to the one of 1860. > I would not recommend that path, instead please wait on my thoughts, if > you do not mind ;-) > Stefan > > On 09/07/2014 05:42 AM, Michael Alexander wrote: > > And now that I'm looking at the stock market... > > > > I don't think I can use much of the existing Stock Market class for > > it. It just won't fit in a rectangle. I could make a new "Stock > > Market" class for this one and make the .xml file specify which one to > > use. Should I take that direction? > > > > Mike > > > > > > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > > <out...@gm... <mailto:out...@gm...> > <mailto:out...@gm... <mailto:out...@gm...>>> > wrote: > > > > I've pushed up my changes - I think I did it correctly, please let > > me know if I messed something up. > > > > I have the Parliament Round mostly working. My next step is to > > work on the stock market. > > > > > > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey <ste...@we... <mailto:ste...@we...> > > <mailto:ste...@we... <mailto:ste...@we...>>> wrote: > > > > I will delay for a further day, as I will only return on > > Saturday. Change of plans. ;-) > > > > > > > > > > Michael Alexander <out...@gm... <mailto:out...@gm...> > > <mailto:out...@gm... > <mailto:out...@gm...>>>schrieb: > > > > I unfortunately had something come up. Don't wait for me. > > > > > > On Thu, Sep 4, 2014 at 1:03 PM, Michael > > Alexander<out...@gm... <mailto:out...@gm...> > > <mailto:out...@gm... <mailto:out...@gm...>>> wrote: > > > > I can get it to a state where I can do that tonight. > > Thanks for the heads up. > > > > > > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > > Frey<ste...@we... > <mailto:ste...@we...> <mailto:ste...@we... > <mailto:ste...@we...>>> > > wrote: > > > > Martin & Alexander: > > I have now rewritten a lot of the tile and token > > lay UI code and intend > > a new alpha tomorrow end-of-day. > > So if you would like to merge some code into > > rails_2_develop, there is > > some time left to do so. > > Good coding, > > Stefan > > > > ------------------------------------------------------------------------------ > > Slashdot TV. > > Video for Nerds. Stuff that matters. > >http://tv.slashdot.org/ > > _______________________________________________ > > Rails-devel mailing list > >Rai...@li... > <mailto:Rai...@li...> > > <mailto:Rai...@li... > <mailto:Rai...@li...>> > >https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > ------------------------------------------------------------------------------ > > Slashdot TV. Video for Nerds. Stuff that > > matters.http://tv.slashdot.org/_______________________________________________ > > <http://tv.slashdot.org/_______________________________________________> > > Rails-devel mailing lis...@li... > <mailto:Rai...@li...> > > <mailto:Rai...@li... > <mailto:Rai...@li...>>https://lists.sourceforge.net/lists/listinfo/rails-devel > > <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... > <mailto:Rai...@li...> > > <mailto:Rai...@li... > <mailto: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... > <mailto: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... > <mailto: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 > |
From: Stefan F. <ste...@we...> - 2014-09-10 15:27:06
|
Follow up with details on 1860/1862 stockmarket: My understanding of the stockmarket of 1860/1862 is that it resembles a hexagonal stock market with pointy topped hexagons (or East/West orientation as it is called in Rails for 18xx maps). It has two rows of hexagons and wraps around at the upper/lower edge. In the following I refer to the definitions used by http://www.redblobgames.com/grids/hexagons/. In axial coordinates we have the following: * The first coordinate is identical to the column number of each row, if we assign the bankrupt field to the first column. * The second coordinate is not vertical, but 60 degrees going from NW to SE. It is identical to the row number (0 and 1). Using this for the 1862 stock market: Bankrupt hex has coordinates (0,0) then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) etc. * Wrap around at the bottom implies that we jump from a "virtual" coordinate (x,2) to coordinate (x+1,0) * Wrap around at the top implies that we jump from a "virtual" coordinate (x,-1) to coordinate (x-1,1). Selling shares implies a transition of (-1, +1): * From 26 (2,0) to 20 (1,1) * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) * From 14 (1,0) to 7 (0,1) * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) Paying dividends is simply increasing the first coordinate according to the number of spaces moved. A more complex version of a hexagonal stockmarket is used in 1854. Stefan On 09/08/2014 06:38 PM, Stefan Frey wrote: > Mike: > below you find a proposal how to restructure StockMarket. This is an > example how I would like to change other components of Rails in the > longer run. > > Please feel free to comment. > > I will write a mail on 1862/1860 stock market specifics later. > > Stefan > > Suggestions for a component structure. Example: Stockmarket > > Currently the core parts of logic, data and creation for the Stockmarket > is combined in one class: Stockmarket. > > A) Separation of Data and Logic > > The data parts of Stockmarket should be moved to a separate class (e.g. > xxxMarketModel). > Possible classes depend on the StockMarket: > e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel > > The logic part replaces the existing StockMarket class and contains > method called from Rails that operate on the > StockMarket, e.g. payout, withhold, sharesSold, etc. > > Most likely there will be some default Markets, like RectangularMarket, > HexagonalMarket or LinearMarket, but more > specialized are possible. > > Customization should be possible in two ways: > > i) Internal configuration due to xml settings. > > ii) Implementing StrategyInterfaces that adjust part of the internal > working of the default market. > E.g. there could be a SoldOutStrategy interface, that allows to change > how the market behaves if > shares are sold out after a stock round. > > B) Move Creation to a Builder/Factory class (StockMarketFactory) > > Creation of the StockMarket is then done by a separate class, that wires > together the different classes according > of the needs of the specific 18xx. > > I prefer to use code to wire together Java elements, so no class names > should appear in xml files. This allows easier refactoring > and code optimizations. > > C) Roadmap > > I offer to create the basic components for 1830 according to the > structure outlined above. Then other > stockmarkets can be modelled along these lines. > > On 09/07/2014 09:18 AM, Michael Alexander wrote: >> Yes, it is extremely similar to 1860. It might be that the only >> difference is that the one in 1862 is longer at the high end. >> >> No hurry on the response, there are plenty of other things to do. >> >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... >> <mailto:ste...@we...>> wrote: >> >> Mike: >> I will come up with a more detailed answer later today. >> I have not played 1862 yet, however from a short glance, it seems that >> the stock market is similar to the one of 1860. >> I would not recommend that path, instead please wait on my thoughts, if >> you do not mind ;-) >> Stefan >> >> On 09/07/2014 05:42 AM, Michael Alexander wrote: >> > And now that I'm looking at the stock market... >> > >> > I don't think I can use much of the existing Stock Market class for >> > it. It just won't fit in a rectangle. I could make a new "Stock >> > Market" class for this one and make the .xml file specify which one to >> > use. Should I take that direction? >> > >> > Mike >> > >> > >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander >> > <out...@gm... <mailto:out...@gm...> >> <mailto:out...@gm... <mailto:out...@gm...>>> >> wrote: >> > >> > I've pushed up my changes - I think I did it correctly, please let >> > me know if I messed something up. >> > >> > I have the Parliament Round mostly working. My next step is to >> > work on the stock market. >> > >> > >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey <ste...@we... <mailto:ste...@we...> >> > <mailto:ste...@we... <mailto:ste...@we...>>> wrote: >> > >> > I will delay for a further day, as I will only return on >> > Saturday. Change of plans. ;-) >> > >> > >> > >> > >> > Michael Alexander <out...@gm... <mailto:out...@gm...> >> > <mailto:out...@gm... >> <mailto:out...@gm...>>>schrieb: >> > >> > I unfortunately had something come up. Don't wait for me. >> > >> > >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael >> > Alexander<out...@gm... <mailto:out...@gm...> >> > <mailto:out...@gm... <mailto:out...@gm...>>> wrote: >> > >> > I can get it to a state where I can do that tonight. >> > Thanks for the heads up. >> > >> > >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan >> > Frey<ste...@we... >> <mailto:ste...@we...> <mailto:ste...@we... >> <mailto:ste...@we...>>> >> > wrote: >> > >> > Martin & Alexander: >> > I have now rewritten a lot of the tile and token >> > lay UI code and intend >> > a new alpha tomorrow end-of-day. >> > So if you would like to merge some code into >> > rails_2_develop, there is >> > some time left to do so. >> > Good coding, >> > Stefan >> > >> > ------------------------------------------------------------------------------ >> > Slashdot TV. >> > Video for Nerds. Stuff that matters. >> >http://tv.slashdot.org/ >> > _______________________________________________ >> > Rails-devel mailing list >> >Rai...@li... >> <mailto:Rai...@li...> >> > <mailto:Rai...@li... >> <mailto:Rai...@li...>> >> >https://lists.sourceforge.net/lists/listinfo/rails-devel >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Slashdot TV. Video for Nerds. Stuff that >> > matters.http://tv.slashdot.org/_______________________________________________ >> > <http://tv.slashdot.org/_______________________________________________> >> > Rails-devel mailing lis...@li... >> <mailto:Rai...@li...> >> > <mailto:Rai...@li... >> <mailto:Rai...@li...>>https://lists.sourceforge.net/lists/listinfo/rails-devel >> > <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... >> <mailto:Rai...@li...> >> > <mailto:Rai...@li... >> <mailto: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... >> <mailto: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... >> <mailto: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 >> > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2014-09-10 15:43:20
|
> A more complex version of a hexagonal stockmarket is used in 1854. And 1837 Erik |
From: Martin B. <dr....@t-...> - 2014-09-10 15:48:04
Attachments:
signature.asc
|
Am 10.09.2014 17:43, schrieb Erik Vos: >> A more complex version of a hexagonal stockmarket is used in 1854. > And 1837 > > Erik > The 1837 could be matched by using different moves to the standard quadratic Market. |
From: brett l. <bre...@gm...> - 2014-09-10 15:48:42
|
Stefan - Your description is not entirely accurate. The market in 1862 is quasi-linear, not hexagonal. It is two rows of values with a half-value offset between the rows. For example: +------------------------+ | 1 | 3 | 5 | 7 | 9 | | | |-------------------------| | | 2 | 4 | 6 | 8 | 10 | +------------------------+ Stock values start on the top row. In this example, let's say a company's par value is at 3. When dividends are paid, the value goes "forward" to 5. The value stays in the same row. When revenue is withheld, the value goes "backward" to 1. The value stays in the same row. When shares are sold during the stock round, the value moves in a "zig-zag" fashion between the rows. So, if the market value is at 5, and three shares are sold, the value moves 5->4->3->2, which leaves the stock price ending on a different row. From that value, the stock price will again move "forward" or "back", linearly, during the operating round. An additional wrinkle to 1862 is that values have a tiered forward progression. Depending on the value of dividends paid, a stock value may move "forward" between 1 and 4 spaces. So, for example a company with a stock price of 5 may move forward one space if they pay out between 3-10, two spaces if they pay 11-20, three spaces if they pay 21-30, and four spaces for paying 31+. (Note: all of these numbers are completely fictitious, as I don't have my copy of 1862 in front of me.) Ultimately, this is really just a linear stock market with different movement multipliers for different actions. The visual representation is largely separate from the basic math. Rails can represent the 1862 market entirely linearly, if we want. A single "forward" movement is simply moving 2 spaces on a one-dimensional market, where a sale would be a movement of -1 space. ---Brett. On Wed, Sep 10, 2014 at 11:26 AM, Stefan Frey <ste...@we...> wrote: > Follow up with details on 1860/1862 stockmarket: > > My understanding of the stockmarket of 1860/1862 is that it resembles a > hexagonal stock market with pointy topped hexagons (or East/West > orientation as it is called in Rails for 18xx maps). > > It has two rows of hexagons and wraps around at the upper/lower edge. > > In the following I refer to the definitions used by > http://www.redblobgames.com/grids/hexagons/. > > In axial coordinates we have the following: > > * The first coordinate is identical to the column number of each row, if > we assign the bankrupt field to the first column. > * The second coordinate is not vertical, but 60 degrees going from NW to > SE. It is identical to the row number (0 and 1). > > Using this for the 1862 stock market: Bankrupt hex has coordinates (0,0) > then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) etc. > > * Wrap around at the bottom implies that we jump from a "virtual" > coordinate (x,2) to coordinate (x+1,0) > * Wrap around at the top implies that we jump from a "virtual" > coordinate (x,-1) to coordinate (x-1,1). > > Selling shares implies a transition of (-1, +1): > > * From 26 (2,0) to 20 (1,1) > * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) > * From 14 (1,0) to 7 (0,1) > * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) > > Paying dividends is simply increasing the first coordinate according to > the number of spaces moved. > > A more complex version of a hexagonal stockmarket is used in 1854. > > Stefan > > On 09/08/2014 06:38 PM, Stefan Frey wrote: > > Mike: > > below you find a proposal how to restructure StockMarket. This is an > > example how I would like to change other components of Rails in the > > longer run. > > > > Please feel free to comment. > > > > I will write a mail on 1862/1860 stock market specifics later. > > > > Stefan > > > > Suggestions for a component structure. Example: Stockmarket > > > > Currently the core parts of logic, data and creation for the Stockmarket > > is combined in one class: Stockmarket. > > > > A) Separation of Data and Logic > > > > The data parts of Stockmarket should be moved to a separate class (e.g. > > xxxMarketModel). > > Possible classes depend on the StockMarket: > > e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel > > > > The logic part replaces the existing StockMarket class and contains > > method called from Rails that operate on the > > StockMarket, e.g. payout, withhold, sharesSold, etc. > > > > Most likely there will be some default Markets, like RectangularMarket, > > HexagonalMarket or LinearMarket, but more > > specialized are possible. > > > > Customization should be possible in two ways: > > > > i) Internal configuration due to xml settings. > > > > ii) Implementing StrategyInterfaces that adjust part of the internal > > working of the default market. > > E.g. there could be a SoldOutStrategy interface, that allows to change > > how the market behaves if > > shares are sold out after a stock round. > > > > B) Move Creation to a Builder/Factory class (StockMarketFactory) > > > > Creation of the StockMarket is then done by a separate class, that wires > > together the different classes according > > of the needs of the specific 18xx. > > > > I prefer to use code to wire together Java elements, so no class names > > should appear in xml files. This allows easier refactoring > > and code optimizations. > > > > C) Roadmap > > > > I offer to create the basic components for 1830 according to the > > structure outlined above. Then other > > stockmarkets can be modelled along these lines. > > > > On 09/07/2014 09:18 AM, Michael Alexander wrote: > >> Yes, it is extremely similar to 1860. It might be that the only > >> difference is that the one in 1862 is longer at the high end. > >> > >> No hurry on the response, there are plenty of other things to do. > >> > >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... > >> <mailto:ste...@we...>> wrote: > >> > >> Mike: > >> I will come up with a more detailed answer later today. > >> I have not played 1862 yet, however from a short glance, it seems > that > >> the stock market is similar to the one of 1860. > >> I would not recommend that path, instead please wait on my > thoughts, if > >> you do not mind ;-) > >> Stefan > >> > >> On 09/07/2014 05:42 AM, Michael Alexander wrote: > >> > And now that I'm looking at the stock market... > >> > > >> > I don't think I can use much of the existing Stock Market class > for > >> > it. It just won't fit in a rectangle. I could make a new "Stock > >> > Market" class for this one and make the .xml file specify which > one to > >> > use. Should I take that direction? > >> > > >> > Mike > >> > > >> > > >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > >> > <out...@gm... <mailto:out...@gm...> > >> <mailto:out...@gm... <mailto:out...@gm...>>> > >> wrote: > >> > > >> > I've pushed up my changes - I think I did it correctly, > please let > >> > me know if I messed something up. > >> > > >> > I have the Parliament Round mostly working. My next step is > to > >> > work on the stock market. > >> > > >> > > >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey < > ste...@we... <mailto:ste...@we...> > >> > <mailto:ste...@we... <mailto:ste...@we...>>> > wrote: > >> > > >> > I will delay for a further day, as I will only return on > >> > Saturday. Change of plans. ;-) > >> > > >> > > >> > > >> > > >> > Michael Alexander <out...@gm... <mailto: > out...@gm...> > >> > <mailto:out...@gm... > >> <mailto:out...@gm...>>>schrieb: > >> > > >> > I unfortunately had something come up. Don't wait > for me. > >> > > >> > > >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael > >> > Alexander<out...@gm... <mailto: > out...@gm...> > >> > <mailto:out...@gm... <mailto: > out...@gm...>>> wrote: > >> > > >> > I can get it to a state where I can do that > tonight. > >> > Thanks for the heads up. > >> > > >> > > >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > >> > Frey<ste...@we... > >> <mailto:ste...@we...> <mailto:ste...@we... > >> <mailto:ste...@we...>>> > >> > wrote: > >> > > >> > Martin & Alexander: > >> > I have now rewritten a lot of the tile and > token > >> > lay UI code and intend > >> > a new alpha tomorrow end-of-day. > >> > So if you would like to merge some code into > >> > rails_2_develop, there is > >> > some time left to do so. > >> > Good coding, > >> > Stefan > |
From: Chris S. <chr...@gm...> - 2014-09-10 17:00:21
|
If you represented the 1862 stock market as a single linear track: Sale = -1 per share Pay less than value = null Pay value = +2 Pay double value = +4 Pay triple value = +6 Pay quad value = +8 There are additional wrinkles for ignoring the first share sold by a non-director in certain ranges, for allowed par values, etc. However, I basically agree with Brett that it's a linear stock market with a double-linear graphical presentation. -- Chris *Warning! NSA analysts could be reading this email. And because there's hardly any accountability, we have no idea how they may use it. If that bothers you, click here to do something about it. <https://www.aclu.org/secure/stopnsa>* On Wed, Sep 10, 2014 at 8:48 AM, brett lentz <bre...@gm...> wrote: > Stefan - > > Your description is not entirely accurate. > > The market in 1862 is quasi-linear, not hexagonal. It is two rows of > values with a half-value offset between the rows. > > For example: > > +------------------------+ > | 1 | 3 | 5 | 7 | 9 | | | > |-------------------------| > | | 2 | 4 | 6 | 8 | 10 | > +------------------------+ > > Stock values start on the top row. In this example, let's say a company's > par value is at 3. > > When dividends are paid, the value goes "forward" to 5. The value stays in > the same row. > When revenue is withheld, the value goes "backward" to 1. The value stays > in the same row. > > When shares are sold during the stock round, the value moves in a > "zig-zag" fashion between the rows. So, if the market value is at 5, and > three shares are sold, the value moves 5->4->3->2, which leaves the stock > price ending on a different row. From that value, the stock price will > again move "forward" or "back", linearly, during the operating round. > > An additional wrinkle to 1862 is that values have a tiered forward > progression. Depending on the value of dividends paid, a stock value may > move "forward" between 1 and 4 spaces. So, for example a company with a > stock price of 5 may move forward one space if they pay out between 3-10, > two spaces if they pay 11-20, three spaces if they pay 21-30, and four > spaces for paying 31+. > > (Note: all of these numbers are completely fictitious, as I don't have my > copy of 1862 in front of me.) > > Ultimately, this is really just a linear stock market with different > movement multipliers for different actions. The visual representation is > largely separate from the basic math. Rails can represent the 1862 market > entirely linearly, if we want. A single "forward" movement is simply moving > 2 spaces on a one-dimensional market, where a sale would be a movement of > -1 space. > > ---Brett. > > > > > On Wed, Sep 10, 2014 at 11:26 AM, Stefan Frey <ste...@we...> wrote: > >> Follow up with details on 1860/1862 stockmarket: >> >> My understanding of the stockmarket of 1860/1862 is that it resembles a >> hexagonal stock market with pointy topped hexagons (or East/West >> orientation as it is called in Rails for 18xx maps). >> >> It has two rows of hexagons and wraps around at the upper/lower edge. >> >> In the following I refer to the definitions used by >> http://www.redblobgames.com/grids/hexagons/. >> >> In axial coordinates we have the following: >> >> * The first coordinate is identical to the column number of each row, if >> we assign the bankrupt field to the first column. >> * The second coordinate is not vertical, but 60 degrees going from NW to >> SE. It is identical to the row number (0 and 1). >> >> Using this for the 1862 stock market: Bankrupt hex has coordinates (0,0) >> then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) etc. >> >> * Wrap around at the bottom implies that we jump from a "virtual" >> coordinate (x,2) to coordinate (x+1,0) >> * Wrap around at the top implies that we jump from a "virtual" >> coordinate (x,-1) to coordinate (x-1,1). >> >> Selling shares implies a transition of (-1, +1): >> >> * From 26 (2,0) to 20 (1,1) >> * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) >> * From 14 (1,0) to 7 (0,1) >> * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) >> >> Paying dividends is simply increasing the first coordinate according to >> the number of spaces moved. >> >> A more complex version of a hexagonal stockmarket is used in 1854. >> >> Stefan >> >> On 09/08/2014 06:38 PM, Stefan Frey wrote: >> > Mike: >> > below you find a proposal how to restructure StockMarket. This is an >> > example how I would like to change other components of Rails in the >> > longer run. >> > >> > Please feel free to comment. >> > >> > I will write a mail on 1862/1860 stock market specifics later. >> > >> > Stefan >> > >> > Suggestions for a component structure. Example: Stockmarket >> > >> > Currently the core parts of logic, data and creation for the Stockmarket >> > is combined in one class: Stockmarket. >> > >> > A) Separation of Data and Logic >> > >> > The data parts of Stockmarket should be moved to a separate class (e.g. >> > xxxMarketModel). >> > Possible classes depend on the StockMarket: >> > e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel >> > >> > The logic part replaces the existing StockMarket class and contains >> > method called from Rails that operate on the >> > StockMarket, e.g. payout, withhold, sharesSold, etc. >> > >> > Most likely there will be some default Markets, like RectangularMarket, >> > HexagonalMarket or LinearMarket, but more >> > specialized are possible. >> > >> > Customization should be possible in two ways: >> > >> > i) Internal configuration due to xml settings. >> > >> > ii) Implementing StrategyInterfaces that adjust part of the internal >> > working of the default market. >> > E.g. there could be a SoldOutStrategy interface, that allows to change >> > how the market behaves if >> > shares are sold out after a stock round. >> > >> > B) Move Creation to a Builder/Factory class (StockMarketFactory) >> > >> > Creation of the StockMarket is then done by a separate class, that wires >> > together the different classes according >> > of the needs of the specific 18xx. >> > >> > I prefer to use code to wire together Java elements, so no class names >> > should appear in xml files. This allows easier refactoring >> > and code optimizations. >> > >> > C) Roadmap >> > >> > I offer to create the basic components for 1830 according to the >> > structure outlined above. Then other >> > stockmarkets can be modelled along these lines. >> > >> > On 09/07/2014 09:18 AM, Michael Alexander wrote: >> >> Yes, it is extremely similar to 1860. It might be that the only >> >> difference is that the one in 1862 is longer at the high end. >> >> >> >> No hurry on the response, there are plenty of other things to do. >> >> >> >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... >> >> <mailto:ste...@we...>> wrote: >> >> >> >> Mike: >> >> I will come up with a more detailed answer later today. >> >> I have not played 1862 yet, however from a short glance, it seems >> that >> >> the stock market is similar to the one of 1860. >> >> I would not recommend that path, instead please wait on my >> thoughts, if >> >> you do not mind ;-) >> >> Stefan >> >> >> >> On 09/07/2014 05:42 AM, Michael Alexander wrote: >> >> > And now that I'm looking at the stock market... >> >> > >> >> > I don't think I can use much of the existing Stock Market class >> for >> >> > it. It just won't fit in a rectangle. I could make a new >> "Stock >> >> > Market" class for this one and make the .xml file specify which >> one to >> >> > use. Should I take that direction? >> >> > >> >> > Mike >> >> > >> >> > >> >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander >> >> > <out...@gm... <mailto:out...@gm...> >> >> <mailto:out...@gm... <mailto:out...@gm... >> >>> >> >> wrote: >> >> > >> >> > I've pushed up my changes - I think I did it correctly, >> please let >> >> > me know if I messed something up. >> >> > >> >> > I have the Parliament Round mostly working. My next step >> is to >> >> > work on the stock market. >> >> > >> >> > >> >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey < >> ste...@we... <mailto:ste...@we...> >> >> > <mailto:ste...@we... <mailto:ste...@we...>>> >> wrote: >> >> > >> >> > I will delay for a further day, as I will only return on >> >> > Saturday. Change of plans. ;-) >> >> > >> >> > >> >> > >> >> > >> >> > Michael Alexander <out...@gm... <mailto: >> out...@gm...> >> >> > <mailto:out...@gm... >> >> <mailto:out...@gm...>>>schrieb: >> >> > >> >> > I unfortunately had something come up. Don't wait >> for me. >> >> > >> >> > >> >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael >> >> > Alexander<out...@gm... <mailto: >> out...@gm...> >> >> > <mailto:out...@gm... <mailto: >> out...@gm...>>> wrote: >> >> > >> >> > I can get it to a state where I can do that >> tonight. >> >> > Thanks for the heads up. >> >> > >> >> > >> >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan >> >> > Frey<ste...@we... >> >> <mailto:ste...@we...> <mailto:ste...@we... >> >> <mailto:ste...@we...>>> >> >> > wrote: >> >> > >> >> > Martin & Alexander: >> >> > I have now rewritten a lot of the tile and >> token >> >> > lay UI code and intend >> >> > a new alpha tomorrow end-of-day. >> >> > So if you would like to merge some code into >> >> > rails_2_develop, there is >> >> > some time left to do so. >> >> > Good coding, >> >> > Stefan >> > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > |
From: Stefan F. <ste...@we...> - 2014-09-10 19:31:24
|
Brett, Martin and Erik: you all make good points. I do not claim that it IS a hexagonal market and it IS NOT a rectangular or anything else. I only wanted to point out, that treating it as hexagonal is a good representation and potentially a better one as the alternatives. A sketch easily shows the equivalence of mine interpretation to that of Brett below: /-\ /-\ /-\ /-\ /-\ | 1 | 3 | 5 | 7 | 9 \-/ \-/ \-/ \-/-\-/ | 2 | 4 | 6 | 8 | \-/ \-/ \-/ \-/ Actually any hexagonal grid is equivalent to a rectangular one with a half square offset: There are six directions from each square (two each at the top and bottom, one each left and right) and this is equivalent to a hexagon grid. And as Martin already pointed out by using adapted movements it can also be modelled as rectangular grid without any offset. My mere intention was to point out that the stockmarket of 1860/1862 is very similar to the one of 1837/1854 and thus could be treated at a variation of an hexagonal market. Even the movement directions of 1860/1862 are identical to those of 1837/1854 (selling shares movement to lower left, dividend payments to the right). How the UI displays the market in the end is a completely different matter. Stefan On 09/10/2014 05:48 PM, brett lentz wrote: > Stefan - > > Your description is not entirely accurate. > > The market in 1862 is quasi-linear, not hexagonal. It is two rows of > values with a half-value offset between the rows. > > For example: > > +------------------------+ > | 1 | 3 | 5 | 7 | 9 | | | > |-------------------------| > | | 2 | 4 | 6 | 8 | 10 | > +------------------------+ > > Stock values start on the top row. In this example, let's say a > company's par value is at 3. > > When dividends are paid, the value goes "forward" to 5. The value stays > in the same row. > When revenue is withheld, the value goes "backward" to 1. The value > stays in the same row. > > When shares are sold during the stock round, the value moves in a > "zig-zag" fashion between the rows. So, if the market value is at 5, and > three shares are sold, the value moves 5->4->3->2, which leaves the > stock price ending on a different row. From that value, the stock price > will again move "forward" or "back", linearly, during the operating round. > > An additional wrinkle to 1862 is that values have a tiered forward > progression. Depending on the value of dividends paid, a stock value may > move "forward" between 1 and 4 spaces. So, for example a company with a > stock price of 5 may move forward one space if they pay out between > 3-10, two spaces if they pay 11-20, three spaces if they pay 21-30, and > four spaces for paying 31+. > > (Note: all of these numbers are completely fictitious, as I don't have > my copy of 1862 in front of me.) > > Ultimately, this is really just a linear stock market with different > movement multipliers for different actions. The visual representation is > largely separate from the basic math. Rails can represent the 1862 > market entirely linearly, if we want. A single "forward" movement is > simply moving 2 spaces on a one-dimensional market, where a sale would > be a movement of -1 space. > > ---Brett. > > > > On Wed, Sep 10, 2014 at 11:26 AM, Stefan Frey <ste...@we... > <mailto:ste...@we...>> wrote: > > Follow up with details on 1860/1862 stockmarket: > > My understanding of the stockmarket of 1860/1862 is that it resembles a > hexagonal stock market with pointy topped hexagons (or East/West > orientation as it is called in Rails for 18xx maps). > > It has two rows of hexagons and wraps around at the upper/lower edge. > > In the following I refer to the definitions used by > http://www.redblobgames.com/grids/hexagons/. > > In axial coordinates we have the following: > > * The first coordinate is identical to the column number of each row, if > we assign the bankrupt field to the first column. > * The second coordinate is not vertical, but 60 degrees going from NW to > SE. It is identical to the row number (0 and 1). > > Using this for the 1862 stock market: Bankrupt hex has coordinates (0,0) > then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) etc. > > * Wrap around at the bottom implies that we jump from a "virtual" > coordinate (x,2) to coordinate (x+1,0) > * Wrap around at the top implies that we jump from a "virtual" > coordinate (x,-1) to coordinate (x-1,1). > > Selling shares implies a transition of (-1, +1): > > * From 26 (2,0) to 20 (1,1) > * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) > * From 14 (1,0) to 7 (0,1) > * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) > > Paying dividends is simply increasing the first coordinate according to > the number of spaces moved. > > A more complex version of a hexagonal stockmarket is used in 1854. > > Stefan > > On 09/08/2014 06:38 PM, Stefan Frey wrote: > > Mike: > > below you find a proposal how to restructure StockMarket. This is an > > example how I would like to change other components of Rails in the > > longer run. > > > > Please feel free to comment. > > > > I will write a mail on 1862/1860 stock market specifics later. > > > > Stefan > > > > Suggestions for a component structure. Example: Stockmarket > > > > Currently the core parts of logic, data and creation for the > Stockmarket > > is combined in one class: Stockmarket. > > > > A) Separation of Data and Logic > > > > The data parts of Stockmarket should be moved to a separate class > (e.g. > > xxxMarketModel). > > Possible classes depend on the StockMarket: > > e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel > > > > The logic part replaces the existing StockMarket class and contains > > method called from Rails that operate on the > > StockMarket, e.g. payout, withhold, sharesSold, etc. > > > > Most likely there will be some default Markets, like > RectangularMarket, > > HexagonalMarket or LinearMarket, but more > > specialized are possible. > > > > Customization should be possible in two ways: > > > > i) Internal configuration due to xml settings. > > > > ii) Implementing StrategyInterfaces that adjust part of the internal > > working of the default market. > > E.g. there could be a SoldOutStrategy interface, that allows to > change > > how the market behaves if > > shares are sold out after a stock round. > > > > B) Move Creation to a Builder/Factory class (StockMarketFactory) > > > > Creation of the StockMarket is then done by a separate class, > that wires > > together the different classes according > > of the needs of the specific 18xx. > > > > I prefer to use code to wire together Java elements, so no class > names > > should appear in xml files. This allows easier refactoring > > and code optimizations. > > > > C) Roadmap > > > > I offer to create the basic components for 1830 according to the > > structure outlined above. Then other > > stockmarkets can be modelled along these lines. > > > > On 09/07/2014 09:18 AM, Michael Alexander wrote: > >> Yes, it is extremely similar to 1860. It might be that the only > >> difference is that the one in 1862 is longer at the high end. > >> > >> No hurry on the response, there are plenty of other things to do. > >> > >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... > <mailto:ste...@we...> > >> <mailto:ste...@we... <mailto:ste...@we...>>> wrote: > >> > >> Mike: > >> I will come up with a more detailed answer later today. > >> I have not played 1862 yet, however from a short glance, it > seems that > >> the stock market is similar to the one of 1860. > >> I would not recommend that path, instead please wait on my > thoughts, if > >> you do not mind ;-) > >> Stefan > >> > >> On 09/07/2014 05:42 AM, Michael Alexander wrote: > >> > And now that I'm looking at the stock market... > >> > > >> > I don't think I can use much of the existing Stock Market > class for > >> > it. It just won't fit in a rectangle. I could make a > new "Stock > >> > Market" class for this one and make the .xml file specify > which one to > >> > use. Should I take that direction? > >> > > >> > Mike > >> > > >> > > >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > >> > <out...@gm... <mailto:out...@gm...> > <mailto:out...@gm... <mailto:out...@gm...>> > >> <mailto:out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>>>> > >> wrote: > >> > > >> > I've pushed up my changes - I think I did it > correctly, please let > >> > me know if I messed something up. > >> > > >> > I have the Parliament Round mostly working. My next > step is to > >> > work on the stock market. > >> > > >> > > >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey > <ste...@we... <mailto:ste...@we...> > <mailto:ste...@we... <mailto:ste...@we...>> > >> > <mailto:ste...@we... > <mailto:ste...@we...> <mailto:ste...@we... > <mailto:ste...@we...>>>> wrote: > >> > > >> > I will delay for a further day, as I will only > return on > >> > Saturday. Change of plans. ;-) > >> > > >> > > >> > > >> > > >> > Michael Alexander <out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>> > >> > <mailto:out...@gm... > <mailto:out...@gm...> > >> <mailto:out...@gm... > <mailto:out...@gm...>>>>schrieb: > >> > > >> > I unfortunately had something come up. Don't > wait for me. > >> > > >> > > >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael > >> > Alexander<out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>> > >> > <mailto:out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>>>> wrote: > >> > > >> > I can get it to a state where I can do > that tonight. > >> > Thanks for the heads up. > >> > > >> > > >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > >> > Frey<ste...@we... > <mailto:ste...@we...> > >> <mailto:ste...@we... <mailto:ste...@we...>> > <mailto:ste...@we... <mailto:ste...@we...> > >> <mailto:ste...@we... <mailto:ste...@we...>>>> > >> > wrote: > >> > > >> > Martin & Alexander: > >> > I have now rewritten a lot of the > tile and token > >> > lay UI code and intend > >> > a new alpha tomorrow end-of-day. > >> > So if you would like to merge some > code into > >> > rails_2_develop, there is > >> > some time left to do so. > >> > Good coding, > >> > Stefan > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Stefan F. <ste...@we...> - 2014-09-10 19:32:56
|
Resubmit with correct indentation of the sketch below, if it works this time... Brett, Martin and Erik: you all make good points. I do not claim that it IS a hexagonal market and it IS NOT a rectangular or anything else. I only wanted to point out, that treating it as hexagonal is a good representation and potentially a better one as the alternatives. A sketch easily shows the equivalence of mine interpretation to that of Brett below: /-\ /-\ /-\ /-\ /-\ | 1 | 3 | 5 | 7 | 9 \-/ \-/ \-/ \-/-\-/ | 2 | 4 | 6 | 8 | \-/ \-/ \-/ \-/ Actually any hexagonal grid is equivalent to a rectangular one with a half square offset: There are six directions from each square (two each at the top and bottom, one each left and right) and this is equivalent to a hexagon grid. And as Martin already pointed out by using adapted movements it can also be modelled as rectangular grid without any offset. My mere intention was to point out that the stockmarket of 1860/1862 is very similar to the one of 1837/1854 and thus could be treated at a variation of an hexagonal market. Even the movement directions of 1860/1862 are identical to those of 1837/1854 (selling shares movement to lower left, dividend payments to the right). How the UI displays the market in the end is a completely different matter. Stefan On 09/10/2014 05:48 PM, brett lentz wrote: > Stefan - > > Your description is not entirely accurate. > > The market in 1862 is quasi-linear, not hexagonal. It is two rows of > values with a half-value offset between the rows. > > For example: > > +------------------------+ > | 1 | 3 | 5 | 7 | 9 | | | > |-------------------------| > | | 2 | 4 | 6 | 8 | 10 | > +------------------------+ > > Stock values start on the top row. In this example, let's say a > company's par value is at 3. > > When dividends are paid, the value goes "forward" to 5. The value stays > in the same row. > When revenue is withheld, the value goes "backward" to 1. The value > stays in the same row. > > When shares are sold during the stock round, the value moves in a > "zig-zag" fashion between the rows. So, if the market value is at 5, and > three shares are sold, the value moves 5->4->3->2, which leaves the > stock price ending on a different row. From that value, the stock price > will again move "forward" or "back", linearly, during the operating round. > > An additional wrinkle to 1862 is that values have a tiered forward > progression. Depending on the value of dividends paid, a stock value may > move "forward" between 1 and 4 spaces. So, for example a company with a > stock price of 5 may move forward one space if they pay out between > 3-10, two spaces if they pay 11-20, three spaces if they pay 21-30, and > four spaces for paying 31+. > > (Note: all of these numbers are completely fictitious, as I don't have > my copy of 1862 in front of me.) > > Ultimately, this is really just a linear stock market with different > movement multipliers for different actions. The visual representation is > largely separate from the basic math. Rails can represent the 1862 > market entirely linearly, if we want. A single "forward" movement is > simply moving 2 spaces on a one-dimensional market, where a sale would > be a movement of -1 space. > > ---Brett. > > > > On Wed, Sep 10, 2014 at 11:26 AM, Stefan Frey <ste...@we... > <mailto:ste...@we...>> wrote: > > Follow up with details on 1860/1862 stockmarket: > > My understanding of the stockmarket of 1860/1862 is that it resembles a > hexagonal stock market with pointy topped hexagons (or East/West > orientation as it is called in Rails for 18xx maps). > > It has two rows of hexagons and wraps around at the upper/lower edge. > > In the following I refer to the definitions used by > http://www.redblobgames.com/grids/hexagons/. > > In axial coordinates we have the following: > > * The first coordinate is identical to the column number of each row, if > we assign the bankrupt field to the first column. > * The second coordinate is not vertical, but 60 degrees going from NW to > SE. It is identical to the row number (0 and 1). > > Using this for the 1862 stock market: Bankrupt hex has coordinates (0,0) > then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) etc. > > * Wrap around at the bottom implies that we jump from a "virtual" > coordinate (x,2) to coordinate (x+1,0) > * Wrap around at the top implies that we jump from a "virtual" > coordinate (x,-1) to coordinate (x-1,1). > > Selling shares implies a transition of (-1, +1): > > * From 26 (2,0) to 20 (1,1) > * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) > * From 14 (1,0) to 7 (0,1) > * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) > > Paying dividends is simply increasing the first coordinate according to > the number of spaces moved. > > A more complex version of a hexagonal stockmarket is used in 1854. > > Stefan > > On 09/08/2014 06:38 PM, Stefan Frey wrote: > > Mike: > > below you find a proposal how to restructure StockMarket. This is an > > example how I would like to change other components of Rails in the > > longer run. > > > > Please feel free to comment. > > > > I will write a mail on 1862/1860 stock market specifics later. > > > > Stefan > > > > Suggestions for a component structure. Example: Stockmarket > > > > Currently the core parts of logic, data and creation for the > Stockmarket > > is combined in one class: Stockmarket. > > > > A) Separation of Data and Logic > > > > The data parts of Stockmarket should be moved to a separate class > (e.g. > > xxxMarketModel). > > Possible classes depend on the StockMarket: > > e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel > > > > The logic part replaces the existing StockMarket class and contains > > method called from Rails that operate on the > > StockMarket, e.g. payout, withhold, sharesSold, etc. > > > > Most likely there will be some default Markets, like > RectangularMarket, > > HexagonalMarket or LinearMarket, but more > > specialized are possible. > > > > Customization should be possible in two ways: > > > > i) Internal configuration due to xml settings. > > > > ii) Implementing StrategyInterfaces that adjust part of the internal > > working of the default market. > > E.g. there could be a SoldOutStrategy interface, that allows to > change > > how the market behaves if > > shares are sold out after a stock round. > > > > B) Move Creation to a Builder/Factory class (StockMarketFactory) > > > > Creation of the StockMarket is then done by a separate class, > that wires > > together the different classes according > > of the needs of the specific 18xx. > > > > I prefer to use code to wire together Java elements, so no class > names > > should appear in xml files. This allows easier refactoring > > and code optimizations. > > > > C) Roadmap > > > > I offer to create the basic components for 1830 according to the > > structure outlined above. Then other > > stockmarkets can be modelled along these lines. > > > > On 09/07/2014 09:18 AM, Michael Alexander wrote: > >> Yes, it is extremely similar to 1860. It might be that the only > >> difference is that the one in 1862 is longer at the high end. > >> > >> No hurry on the response, there are plenty of other things to do. > >> > >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... > <mailto:ste...@we...> > >> <mailto:ste...@we... <mailto:ste...@we...>>> wrote: > >> > >> Mike: > >> I will come up with a more detailed answer later today. > >> I have not played 1862 yet, however from a short glance, it > seems that > >> the stock market is similar to the one of 1860. > >> I would not recommend that path, instead please wait on my > thoughts, if > >> you do not mind ;-) > >> Stefan > >> > >> On 09/07/2014 05:42 AM, Michael Alexander wrote: > >> > And now that I'm looking at the stock market... > >> > > >> > I don't think I can use much of the existing Stock Market > class for > >> > it. It just won't fit in a rectangle. I could make a > new "Stock > >> > Market" class for this one and make the .xml file specify > which one to > >> > use. Should I take that direction? > >> > > >> > Mike > >> > > >> > > >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > >> > <out...@gm... <mailto:out...@gm...> > <mailto:out...@gm... <mailto:out...@gm...>> > >> <mailto:out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>>>> > >> wrote: > >> > > >> > I've pushed up my changes - I think I did it > correctly, please let > >> > me know if I messed something up. > >> > > >> > I have the Parliament Round mostly working. My next > step is to > >> > work on the stock market. > >> > > >> > > >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey > <ste...@we... <mailto:ste...@we...> > <mailto:ste...@we... <mailto:ste...@we...>> > >> > <mailto:ste...@we... > <mailto:ste...@we...> <mailto:ste...@we... > <mailto:ste...@we...>>>> wrote: > >> > > >> > I will delay for a further day, as I will only > return on > >> > Saturday. Change of plans. ;-) > >> > > >> > > >> > > >> > > >> > Michael Alexander <out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>> > >> > <mailto:out...@gm... > <mailto:out...@gm...> > >> <mailto:out...@gm... > <mailto:out...@gm...>>>>schrieb: > >> > > >> > I unfortunately had something come up. Don't > wait for me. > >> > > >> > > >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael > >> > Alexander<out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>> > >> > <mailto:out...@gm... > <mailto:out...@gm...> <mailto:out...@gm... > <mailto:out...@gm...>>>> wrote: > >> > > >> > I can get it to a state where I can do > that tonight. > >> > Thanks for the heads up. > >> > > >> > > >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > >> > Frey<ste...@we... > <mailto:ste...@we...> > >> <mailto:ste...@we... <mailto:ste...@we...>> > <mailto:ste...@we... <mailto:ste...@we...> > >> <mailto:ste...@we... <mailto:ste...@we...>>>> > >> > wrote: > >> > > >> > Martin & Alexander: > >> > I have now rewritten a lot of the > tile and token > >> > lay UI code and intend > >> > a new alpha tomorrow end-of-day. > >> > So if you would like to merge some > code into > >> > rails_2_develop, there is > >> > some time left to do so. > >> > Good coding, > >> > Stefan > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Martin B. <dr....@t-...> - 2014-09-10 19:40:19
Attachments:
signature.asc
0x718625A5.asc
|
Hi Stefan, question 3: do we, to keep with the original display implement a new stockmarket display ? or do we trust the players to understand the switch from hexagonal to rectangular ? Regards, Martin On 10.09.2014 21:32, Stefan Frey wrote: > Resubmit with correct indentation of the sketch below, if it works this > time... > > > Brett, Martin and Erik: > you all make good points. I do not claim that it IS a hexagonal market > and it IS NOT a rectangular or anything else. > > I only wanted to point out, that treating it as hexagonal is a good > representation and potentially a better one as the alternatives. > > A sketch easily shows the equivalence of mine interpretation to that of > Brett below: > > /-\ /-\ /-\ /-\ /-\ > | 1 | 3 | 5 | 7 | 9 > \-/ \-/ \-/ \-/-\-/ > | 2 | 4 | 6 | 8 | > \-/ \-/ \-/ \-/ > > Actually any hexagonal grid is equivalent to a rectangular one with a > half square offset: There are six directions from each square (two each > at the top and bottom, one each left and right) and this is equivalent > to a hexagon grid. > > And as Martin already pointed out by using adapted movements it can also > be modelled as rectangular grid without any offset. > > My mere intention was to point out that the stockmarket of 1860/1862 is > very similar to the one of 1837/1854 and thus could be treated > at a variation of an hexagonal market. Even the movement directions of > 1860/1862 are identical to those of 1837/1854 (selling shares movement > to lower left, dividend payments to the right). > > How the UI displays the market in the end is a completely different matter. > > Stefan > > > On 09/10/2014 05:48 PM, brett lentz wrote: >> Stefan - >> >> Your description is not entirely accurate. >> >> The market in 1862 is quasi-linear, not hexagonal. It is two rows of >> values with a half-value offset between the rows. >> >> For example: >> >> +------------------------+ >> | 1 | 3 | 5 | 7 | 9 | | | >> |-------------------------| >> | | 2 | 4 | 6 | 8 | 10 | >> +------------------------+ >> >> Stock values start on the top row. In this example, let's say a >> company's par value is at 3. >> >> When dividends are paid, the value goes "forward" to 5. The value stays >> in the same row. >> When revenue is withheld, the value goes "backward" to 1. The value >> stays in the same row. >> >> When shares are sold during the stock round, the value moves in a >> "zig-zag" fashion between the rows. So, if the market value is at 5, and >> three shares are sold, the value moves 5->4->3->2, which leaves the >> stock price ending on a different row. From that value, the stock price >> will again move "forward" or "back", linearly, during the operating round. >> >> An additional wrinkle to 1862 is that values have a tiered forward >> progression. Depending on the value of dividends paid, a stock value may >> move "forward" between 1 and 4 spaces. So, for example a company with a >> stock price of 5 may move forward one space if they pay out between >> 3-10, two spaces if they pay 11-20, three spaces if they pay 21-30, and >> four spaces for paying 31+. >> >> (Note: all of these numbers are completely fictitious, as I don't have >> my copy of 1862 in front of me.) >> >> Ultimately, this is really just a linear stock market with different >> movement multipliers for different actions. The visual representation is >> largely separate from the basic math. Rails can represent the 1862 >> market entirely linearly, if we want. A single "forward" movement is >> simply moving 2 spaces on a one-dimensional market, where a sale would >> be a movement of -1 space. >> >> ---Brett. >> >> >> >> On Wed, Sep 10, 2014 at 11:26 AM, Stefan Frey <ste...@we... >> <mailto:ste...@we...>> wrote: >> >> Follow up with details on 1860/1862 stockmarket: >> >> My understanding of the stockmarket of 1860/1862 is that it resembles a >> hexagonal stock market with pointy topped hexagons (or East/West >> orientation as it is called in Rails for 18xx maps). >> >> It has two rows of hexagons and wraps around at the upper/lower edge. >> >> In the following I refer to the definitions used by >> http://www.redblobgames.com/grids/hexagons/. >> >> In axial coordinates we have the following: >> >> * The first coordinate is identical to the column number of each row, if >> we assign the bankrupt field to the first column. >> * The second coordinate is not vertical, but 60 degrees going from NW to >> SE. It is identical to the row number (0 and 1). >> >> Using this for the 1862 stock market: Bankrupt hex has coordinates (0,0) >> then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) etc. >> >> * Wrap around at the bottom implies that we jump from a "virtual" >> coordinate (x,2) to coordinate (x+1,0) >> * Wrap around at the top implies that we jump from a "virtual" >> coordinate (x,-1) to coordinate (x-1,1). >> >> Selling shares implies a transition of (-1, +1): >> >> * From 26 (2,0) to 20 (1,1) >> * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) >> * From 14 (1,0) to 7 (0,1) >> * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) >> >> Paying dividends is simply increasing the first coordinate according to >> the number of spaces moved. >> >> A more complex version of a hexagonal stockmarket is used in 1854. >> >> Stefan >> >> On 09/08/2014 06:38 PM, Stefan Frey wrote: >> > Mike: >> > below you find a proposal how to restructure StockMarket. This is an >> > example how I would like to change other components of Rails in the >> > longer run. >> > >> > Please feel free to comment. >> > >> > I will write a mail on 1862/1860 stock market specifics later. >> > >> > Stefan >> > >> > Suggestions for a component structure. Example: Stockmarket >> > >> > Currently the core parts of logic, data and creation for the >> Stockmarket >> > is combined in one class: Stockmarket. >> > >> > A) Separation of Data and Logic >> > >> > The data parts of Stockmarket should be moved to a separate class >> (e.g. >> > xxxMarketModel). >> > Possible classes depend on the StockMarket: >> > e.g. RectangularMarketModel, HexagonalMarketModel, LinearMarketModel >> > >> > The logic part replaces the existing StockMarket class and contains >> > method called from Rails that operate on the >> > StockMarket, e.g. payout, withhold, sharesSold, etc. >> > >> > Most likely there will be some default Markets, like >> RectangularMarket, >> > HexagonalMarket or LinearMarket, but more >> > specialized are possible. >> > >> > Customization should be possible in two ways: >> > >> > i) Internal configuration due to xml settings. >> > >> > ii) Implementing StrategyInterfaces that adjust part of the internal >> > working of the default market. >> > E.g. there could be a SoldOutStrategy interface, that allows to >> change >> > how the market behaves if >> > shares are sold out after a stock round. >> > >> > B) Move Creation to a Builder/Factory class (StockMarketFactory) >> > >> > Creation of the StockMarket is then done by a separate class, >> that wires >> > together the different classes according >> > of the needs of the specific 18xx. >> > >> > I prefer to use code to wire together Java elements, so no class >> names >> > should appear in xml files. This allows easier refactoring >> > and code optimizations. >> > >> > C) Roadmap >> > >> > I offer to create the basic components for 1830 according to the >> > structure outlined above. Then other >> > stockmarkets can be modelled along these lines. >> > >> > On 09/07/2014 09:18 AM, Michael Alexander wrote: >> >> Yes, it is extremely similar to 1860. It might be that the only >> >> difference is that the one in 1862 is longer at the high end. >> >> >> >> No hurry on the response, there are plenty of other things to do. >> >> >> >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... >> <mailto:ste...@we...> >> >> <mailto:ste...@we... <mailto:ste...@we...>>> wrote: >> >> >> >> Mike: >> >> I will come up with a more detailed answer later today. >> >> I have not played 1862 yet, however from a short glance, it >> seems that >> >> the stock market is similar to the one of 1860. >> >> I would not recommend that path, instead please wait on my >> thoughts, if >> >> you do not mind ;-) >> >> Stefan >> >> >> >> On 09/07/2014 05:42 AM, Michael Alexander wrote: >> >> > And now that I'm looking at the stock market... >> >> > >> >> > I don't think I can use much of the existing Stock Market >> class for >> >> > it. It just won't fit in a rectangle. I could make a >> new "Stock >> >> > Market" class for this one and make the .xml file specify >> which one to >> >> > use. Should I take that direction? >> >> > >> >> > Mike >> >> > >> >> > >> >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander >> >> > <out...@gm... <mailto:out...@gm...> >> <mailto:out...@gm... <mailto:out...@gm...>> >> >> <mailto:out...@gm... >> <mailto:out...@gm...> <mailto:out...@gm... >> <mailto:out...@gm...>>>> >> >> wrote: >> >> > >> >> > I've pushed up my changes - I think I did it >> correctly, please let >> >> > me know if I messed something up. >> >> > >> >> > I have the Parliament Round mostly working. My next >> step is to >> >> > work on the stock market. >> >> > >> >> > >> >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey >> <ste...@we... <mailto:ste...@we...> >> <mailto:ste...@we... <mailto:ste...@we...>> >> >> > <mailto:ste...@we... >> <mailto:ste...@we...> <mailto:ste...@we... >> <mailto:ste...@we...>>>> wrote: >> >> > >> >> > I will delay for a further day, as I will only >> return on >> >> > Saturday. Change of plans. ;-) >> >> > >> >> > >> >> > >> >> > >> >> > Michael Alexander <out...@gm... >> <mailto:out...@gm...> <mailto:out...@gm... >> <mailto:out...@gm...>> >> >> > <mailto:out...@gm... >> <mailto:out...@gm...> >> >> <mailto:out...@gm... >> <mailto:out...@gm...>>>>schrieb: >> >> > >> >> > I unfortunately had something come up. Don't >> wait for me. >> >> > >> >> > >> >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael >> >> > Alexander<out...@gm... >> <mailto:out...@gm...> <mailto:out...@gm... >> <mailto:out...@gm...>> >> >> > <mailto:out...@gm... >> <mailto:out...@gm...> <mailto:out...@gm... >> <mailto:out...@gm...>>>> wrote: >> >> > >> >> > I can get it to a state where I can do >> that tonight. >> >> > Thanks for the heads up. >> >> > >> >> > >> >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan >> >> > Frey<ste...@we... >> <mailto:ste...@we...> >> >> <mailto:ste...@we... <mailto:ste...@we...>> >> <mailto:ste...@we... <mailto:ste...@we...> >> >> <mailto:ste...@we... <mailto:ste...@we...>>>> >> >> > wrote: >> >> > >> >> > Martin & Alexander: >> >> > I have now rewritten a lot of the >> tile and token >> >> > lay UI code and intend >> >> > a new alpha tomorrow end-of-day. >> >> > So if you would like to merge some >> code into >> >> > rails_2_develop, there is >> >> > some time left to do so. >> >> > Good coding, >> >> > Stefan >> >> >> >> ------------------------------------------------------------------------------ >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce >> Perforce version control. Predictably reliable. >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel >> > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: brett l. <bre...@gm...> - 2014-09-10 19:43:31
|
Thanks for the clarification. It looks like we're all in agreement about the behavior. I don't see any reason to bikeshed the implementation details. HexGrid seems as good as LinearGrid to me for this case. ---Brett. ---Brett. On Wed, Sep 10, 2014 at 3:32 PM, Stefan Frey <ste...@we...> wrote: > Resubmit with correct indentation of the sketch below, if it works this > time... > > > Brett, Martin and Erik: > you all make good points. I do not claim that it IS a hexagonal market > and it IS NOT a rectangular or anything else. > > I only wanted to point out, that treating it as hexagonal is a good > representation and potentially a better one as the alternatives. > > A sketch easily shows the equivalence of mine interpretation to that of > Brett below: > > /-\ /-\ /-\ /-\ /-\ > | 1 | 3 | 5 | 7 | 9 > \-/ \-/ \-/ \-/-\-/ > | 2 | 4 | 6 | 8 | > \-/ \-/ \-/ \-/ > > Actually any hexagonal grid is equivalent to a rectangular one with a > half square offset: There are six directions from each square (two each > at the top and bottom, one each left and right) and this is equivalent > to a hexagon grid. > > And as Martin already pointed out by using adapted movements it can also > be modelled as rectangular grid without any offset. > > My mere intention was to point out that the stockmarket of 1860/1862 is > very similar to the one of 1837/1854 and thus could be treated > at a variation of an hexagonal market. Even the movement directions of > 1860/1862 are identical to those of 1837/1854 (selling shares movement > to lower left, dividend payments to the right). > > How the UI displays the market in the end is a completely different matter. > > Stefan > > > On 09/10/2014 05:48 PM, brett lentz wrote: > > Stefan - > > > > Your description is not entirely accurate. > > > > The market in 1862 is quasi-linear, not hexagonal. It is two rows of > > values with a half-value offset between the rows. > > > > For example: > > > > +------------------------+ > > | 1 | 3 | 5 | 7 | 9 | | | > > |-------------------------| > > | | 2 | 4 | 6 | 8 | 10 | > > +------------------------+ > > > > Stock values start on the top row. In this example, let's say a > > company's par value is at 3. > > > > When dividends are paid, the value goes "forward" to 5. The value stays > > in the same row. > > When revenue is withheld, the value goes "backward" to 1. The value > > stays in the same row. > > > > When shares are sold during the stock round, the value moves in a > > "zig-zag" fashion between the rows. So, if the market value is at 5, and > > three shares are sold, the value moves 5->4->3->2, which leaves the > > stock price ending on a different row. From that value, the stock price > > will again move "forward" or "back", linearly, during the operating > round. > > > > An additional wrinkle to 1862 is that values have a tiered forward > > progression. Depending on the value of dividends paid, a stock value may > > move "forward" between 1 and 4 spaces. So, for example a company with a > > stock price of 5 may move forward one space if they pay out between > > 3-10, two spaces if they pay 11-20, three spaces if they pay 21-30, and > > four spaces for paying 31+. > > > > (Note: all of these numbers are completely fictitious, as I don't have > > my copy of 1862 in front of me.) > > > > Ultimately, this is really just a linear stock market with different > > movement multipliers for different actions. The visual representation is > > largely separate from the basic math. Rails can represent the 1862 > > market entirely linearly, if we want. A single "forward" movement is > > simply moving 2 spaces on a one-dimensional market, where a sale would > > be a movement of -1 space. > > > > ---Brett. > > > > > > > > On Wed, Sep 10, 2014 at 11:26 AM, Stefan Frey <ste...@we... > > <mailto:ste...@we...>> wrote: > > > > Follow up with details on 1860/1862 stockmarket: > > > > My understanding of the stockmarket of 1860/1862 is that it > resembles a > > hexagonal stock market with pointy topped hexagons (or East/West > > orientation as it is called in Rails for 18xx maps). > > > > It has two rows of hexagons and wraps around at the upper/lower edge. > > > > In the following I refer to the definitions used by > > http://www.redblobgames.com/grids/hexagons/. > > > > In axial coordinates we have the following: > > > > * The first coordinate is identical to the column number of each > row, if > > we assign the bankrupt field to the first column. > > * The second coordinate is not vertical, but 60 degrees going from > NW to > > SE. It is identical to the row number (0 and 1). > > > > Using this for the 1862 stock market: Bankrupt hex has coordinates > (0,0) > > then 7 is (0,1), followed by 14 (1,0), 20 (1,1), 26 (2,0), 31 (2,1) > etc. > > > > * Wrap around at the bottom implies that we jump from a "virtual" > > coordinate (x,2) to coordinate (x+1,0) > > * Wrap around at the top implies that we jump from a "virtual" > > coordinate (x,-1) to coordinate (x-1,1). > > > > Selling shares implies a transition of (-1, +1): > > > > * From 26 (2,0) to 20 (1,1) > > * From 20 (1,1) to virtual (0,2) => wrap around edges => 14 (1,0) > > * From 14 (1,0) to 7 (0,1) > > * From 7 (0,1) to virtual (-1,2) => wrap => bankrupt (0,0) > > > > Paying dividends is simply increasing the first coordinate according > to > > the number of spaces moved. > > > > A more complex version of a hexagonal stockmarket is used in 1854. > > > > Stefan > > > > On 09/08/2014 06:38 PM, Stefan Frey wrote: > > > Mike: > > > below you find a proposal how to restructure StockMarket. This is > an > > > example how I would like to change other components of Rails in > the > > > longer run. > > > > > > Please feel free to comment. > > > > > > I will write a mail on 1862/1860 stock market specifics later. > > > > > > Stefan > > > > > > Suggestions for a component structure. Example: Stockmarket > > > > > > Currently the core parts of logic, data and creation for the > > Stockmarket > > > is combined in one class: Stockmarket. > > > > > > A) Separation of Data and Logic > > > > > > The data parts of Stockmarket should be moved to a separate class > > (e.g. > > > xxxMarketModel). > > > Possible classes depend on the StockMarket: > > > e.g. RectangularMarketModel, HexagonalMarketModel, > LinearMarketModel > > > > > > The logic part replaces the existing StockMarket class and > contains > > > method called from Rails that operate on the > > > StockMarket, e.g. payout, withhold, sharesSold, etc. > > > > > > Most likely there will be some default Markets, like > > RectangularMarket, > > > HexagonalMarket or LinearMarket, but more > > > specialized are possible. > > > > > > Customization should be possible in two ways: > > > > > > i) Internal configuration due to xml settings. > > > > > > ii) Implementing StrategyInterfaces that adjust part of the > internal > > > working of the default market. > > > E.g. there could be a SoldOutStrategy interface, that allows to > > change > > > how the market behaves if > > > shares are sold out after a stock round. > > > > > > B) Move Creation to a Builder/Factory class (StockMarketFactory) > > > > > > Creation of the StockMarket is then done by a separate class, > > that wires > > > together the different classes according > > > of the needs of the specific 18xx. > > > > > > I prefer to use code to wire together Java elements, so no class > > names > > > should appear in xml files. This allows easier refactoring > > > and code optimizations. > > > > > > C) Roadmap > > > > > > I offer to create the basic components for 1830 according to the > > > structure outlined above. Then other > > > stockmarkets can be modelled along these lines. > > > > > > On 09/07/2014 09:18 AM, Michael Alexander wrote: > > >> Yes, it is extremely similar to 1860. It might be that the only > > >> difference is that the one in 1862 is longer at the high end. > > >> > > >> No hurry on the response, there are plenty of other things to do. > > >> > > >> On Sun, Sep 7, 2014 at 3:09 AM, Stefan Frey <ste...@we... > > <mailto:ste...@we...> > > >> <mailto:ste...@we... <mailto:ste...@we...>>> wrote: > > >> > > >> Mike: > > >> I will come up with a more detailed answer later today. > > >> I have not played 1862 yet, however from a short glance, it > > seems that > > >> the stock market is similar to the one of 1860. > > >> I would not recommend that path, instead please wait on my > > thoughts, if > > >> you do not mind ;-) > > >> Stefan > > >> > > >> On 09/07/2014 05:42 AM, Michael Alexander wrote: > > >> > And now that I'm looking at the stock market... > > >> > > > >> > I don't think I can use much of the existing Stock Market > > class for > > >> > it. It just won't fit in a rectangle. I could make a > > new "Stock > > >> > Market" class for this one and make the .xml file specify > > which one to > > >> > use. Should I take that direction? > > >> > > > >> > Mike > > >> > > > >> > > > >> > On Sat, Sep 6, 2014 at 8:54 PM, Michael Alexander > > >> > <out...@gm... <mailto:out...@gm...> > > <mailto:out...@gm... <mailto:out...@gm...>> > > >> <mailto:out...@gm... > > <mailto:out...@gm...> <mailto:out...@gm... > > <mailto:out...@gm...>>>> > > >> wrote: > > >> > > > >> > I've pushed up my changes - I think I did it > > correctly, please let > > >> > me know if I messed something up. > > >> > > > >> > I have the Parliament Round mostly working. My next > > step is to > > >> > work on the stock market. > > >> > > > >> > > > >> > On Fri, Sep 5, 2014 at 2:46 AM, Stefan Frey > > <ste...@we... <mailto:ste...@we...> > > <mailto:ste...@we... <mailto:ste...@we...>> > > >> > <mailto:ste...@we... > > <mailto:ste...@we...> <mailto:ste...@we... > > <mailto:ste...@we...>>>> wrote: > > >> > > > >> > I will delay for a further day, as I will only > > return on > > >> > Saturday. Change of plans. ;-) > > >> > > > >> > > > >> > > > >> > > > >> > Michael Alexander <out...@gm... > > <mailto:out...@gm...> <mailto:out...@gm... > > <mailto:out...@gm...>> > > >> > <mailto:out...@gm... > > <mailto:out...@gm...> > > >> <mailto:out...@gm... > > <mailto:out...@gm...>>>>schrieb: > > >> > > > >> > I unfortunately had something come up. Don't > > wait for me. > > >> > > > >> > > > >> > On Thu, Sep 4, 2014 at 1:03 PM, Michael > > >> > Alexander<out...@gm... > > <mailto:out...@gm...> <mailto:out...@gm... > > <mailto:out...@gm...>> > > >> > <mailto:out...@gm... > > <mailto:out...@gm...> <mailto:out...@gm... > > <mailto:out...@gm...>>>> wrote: > > >> > > > >> > I can get it to a state where I can do > > that tonight. > > >> > Thanks for the heads up. > > >> > > > >> > > > >> > On Thu, Sep 4, 2014 at 12:56 PM, Stefan > > >> > Frey<ste...@we... > > <mailto:ste...@we...> > > >> <mailto:ste...@we... <mailto:ste...@we...>> > > <mailto:ste...@we... <mailto:ste...@we...> > > >> <mailto:ste...@we... <mailto:ste...@we...>>>> > > >> > wrote: > > >> > > > >> > Martin & Alexander: > > >> > I have now rewritten a lot of the > > tile and token > > >> > lay UI code and intend > > >> > a new alpha tomorrow end-of-day. > > >> > So if you would like to merge some > > code into > > >> > rails_2_develop, there is > > >> > some time left to do so. > > >> > Good coding, > > >> > Stefan > > > > > > > > > ------------------------------------------------------------------------------ > > Want excitement? > > Manually upgrade your production database. > > When you want reliability, choose Perforce > > Perforce version control. Predictably reliable. > > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > > > > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: <com...@ip...> - 2014-09-10 21:57:02
|
For me, the critical things would be "what are players used to?" and "what are the official rules?" Hexgrid may be a more logical or concise layout, but if it doesn't meet either or both of those criteria, it should be an option, not a default. Which would then raise the logical question of whether or not it is worth the effort of creating it as an option. Mike Bourke >-- Original Message -- >From: brett lentz <bre...@gm...> >Date: Wed, 10 Sep 2014 15:43:02 -0400 >To: an 18xx game <rai...@li...> >Subject: Re: [Rails-devel] Changes to Stockmarket >Reply-To: "Development list for Rails: an 18xx game" > <rai...@li...> > > >Thanks for the clarification. It looks like we're all in agreement about >the behavior. > >I don't see any reason to bikeshed the implementation details. HexGrid >seems as good as LinearGrid to me for this case. |
From: Chris S. <chr...@gm...> - 2014-09-11 04:55:27
|
If I'm not mistaken, the use of linear grid and hex grid are completely independent of the graphic display presented to players. The grids are the logical underpinnings, but players would see the same stock market that appears printed on the board now. Correct? -- Chris *Warning! NSA analysts could be reading this email. And because there's hardly any accountability, we have no idea how they may use it. If that bothers you, click here to do something about it. <https://www.aclu.org/secure/stopnsa>* On Wed, Sep 10, 2014 at 2:56 PM, <com...@ip...> wrote: > For me, the critical things would be "what are players used to?" and "what > are the official rules?" Hexgrid may be a more logical or concise layout, > but if it doesn't meet either or both of those criteria, it should be an > option, not a default. Which would then raise the logical question of > whether > or not it is worth the effort of creating it as an option. > > Mike Bourke > > > > >-- Original Message -- > >From: brett lentz <bre...@gm...> > >Date: Wed, 10 Sep 2014 15:43:02 -0400 > >To: an 18xx game <rai...@li...> > >Subject: Re: [Rails-devel] Changes to Stockmarket > >Reply-To: "Development list for Rails: an 18xx game" > > <rai...@li...> > > > > > >Thanks for the clarification. It looks like we're all in agreement about > >the behavior. > > > >I don't see any reason to bikeshed the implementation details. HexGrid > >seems as good as LinearGrid to me for this case. > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Stefan F. <ste...@we...> - 2014-09-11 06:21:19
|
yes, UI support is a different matter. I was mostly discussing the underlying core mechanisms. On 09/11/2014 06:55 AM, Chris Shaffer wrote: > If I'm not mistaken, the use of linear grid and hex grid are completely > independent of the graphic display presented to players. The grids are > the logical underpinnings, but players would see the same stock market > that appears printed on the board now. Correct? > > > -- > Chris > > /Warning! NSA analysts could be reading this email. And because there’s > hardly any accountability, we have no idea how they may use it. If that > bothers you, click here to do something about it. > <https://www.aclu.org/secure/stopnsa>/ > > > On Wed, Sep 10, 2014 at 2:56 PM, <com...@ip... > <mailto:com...@ip...>> wrote: > > For me, the critical things would be "what are players used to?" and > "what > are the official rules?" Hexgrid may be a more logical or concise > layout, > but if it doesn't meet either or both of those criteria, it should be an > option, not a default. Which would then raise the logical question > of whether > or not it is worth the effort of creating it as an option. > > Mike Bourke > > > > >-- Original Message -- > >From: brett lentz <bre...@gm... <mailto:bre...@gm...>> > >Date: Wed, 10 Sep 2014 15:43:02 -0400 > >To: an 18xx game <rai...@li... > <mailto:rai...@li...>> > >Subject: Re: [Rails-devel] Changes to Stockmarket > >Reply-To: "Development list for Rails: an 18xx game" > > <rai...@li... > <mailto:rai...@li...>> > > > > > >Thanks for the clarification. It looks like we're all in agreement about > >the behavior. > > > >I don't see any reason to bikeshed the implementation details. HexGrid > >seems as good as LinearGrid to me for this case. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Rails-devel mailing list > Rai...@li... > <mailto:Rai...@li...> > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |