From: John D. G. <jd...@di...> - 2014-04-26 02:11:14
|
On 2014-04-24 23:57, Stefan Frey wrote: > Martin & John: > some comments about how to answer the questions: > > There are two classes of companies defined by the Java code: > > PrivateCompany (inherits from Company and Certificate) > => Only pays dividends > => Ownership direct by one player > > PublicCompany (inherits from Company): > => Operate trains > => Ownership via shares > > So this implies that currently all operating companies have to be public > companies. This explains why the minors in 1835 have to be public > companies with one 100% share. > > Then it is allowed to use "company templates" in CompanyManager.xml to > avoid repeating common attributes for companies. > > So in my opinion 1837 the following templates should be defined: > > * Mountain Railways (based on PrivateCompany) > * Coal Railways (based on PublicCompany with 1 100% share) > > * Südbahnen (based on PublicCompany with 1 100% share) > * K&K Bahnen (based on PublicCompany with 1 100% share) > * Ungarische (based on PublicCompany) > > * Nationals (based on PublicCompany) > * Majors (based on PublicCompany) I have a somewhat simpler architecture in mind. However, my design doesn't start there, but with the detailed things that 1837 needs and the existing Rails code can't do. So I'll begin, more or less, with my to-do list. 1. Generalize the code that handles Prussian formation (and mergers into it) in 1835, so that there can be more than one "Prussian". This involves creating a new class, NationalCompany, which has the property that some of its share certificates are reserved to be exchanged for the various companies that will eventually merge into it. A NationalCompany is a PublicCompany with these additional properties. * A list of the other companies (of any kind) which will merge, and the shares to be exchanged for each. If any of the predecessors is a public company then there must be an exchange certificate for each one of its share certificates. * The game phase that begins the period in which the NationalCompany may form. (The predecessor that converts to the president's share is, by definition, the one that may form it.) * The game phase at which the NationalCompany must form. * The game phase at which all predecessors of the NationalCompany must merge. [Two important notes here. (a) Two or even all three of these phases may be the same, thus forcing the NationalCompany to form and merge all its predecessors at once. SD does this in 1837. (b) If more than one NationalCompany is giving the same player repeated opportunities to form it or merge predecessors into it, that player should see only one dialog box with these choices each round -- not one for each minor or even each NationalCompany. That would be too much clutter.] * A boolean which if true, means that when all non-reserved shares of the NationalCompany are out of the IPO, all predecessors of the NationalCompany must merge at the end of that stock round. (Thus I can use this class, not only for the three state railways in 1837, but also for most of its other public companies -- to handle the coal companies that will merge into each one). The existing XML interface that handles the definitions of companies should be expanded to cover these properties. Once the above is tested and working, it should probably be used by 1835 (and 18Mex, and maybe someday 2038, etc...) Thus I don't see it as belonging in gamespecific_1837. [For grins I may even include the capability to have a predecessor "decide" that it'll never merge after all, thus moving its reserved trade-in share of the NationalCompany into the regular IPO. This would handle the growth companies in 2038.] 2. Generalize MinorCompany_1835 to MinorCompany_1837. Not much needs to be changed here, but I want the companies to have a couple of new properties. One is that a MinorCompany_1837 can have multiple shares. (I want to handle U1 and U3 this way because most of the differences between the existing public and minor company classes relate to the fact that PublicCompany shares can be sold, and therefore have a market price. U1 and U3 can't and don't.) The other new property is that certain minor companies (the coal companies) can only own certain types of trains. As with #1, the XML interface that handles definitions of companies should be expanded to cover these properties. 3. Generalize the start-round code. 1837 has two start packets: one where you're buying companies (or a private company plus a share, as in 1835) from the top of any column in a 3-column table. Then when that sells out, the minor companies of KK and UG form a second "start packet" where you can buy anything (but not the non-president's share of U1 or U3 before the president's share). Someone wrote that Rails can now handle a second start packet, but I haven't gone through that section of the code since it changed. * * * Once that laundry list is done, the company types become roughly this. Mountain railways -> PrivateCompany. No need to even call them anything else. Coal and Minor companies -> MinorCompany_1837. Major companies, including State companies -> all NationalCompany, except the one (GT, IIRC) which has no coal company that merges into it. That one is just a PublicCompany. |