From: John A. T. <ja...@ja...> - 2008-11-09 23:29:07
|
Mark Smith wrote: > I was looking at the current copies of 'Company', 'PublicCompany', > 'PrivateCompany' and I would like to ask another question. > > I see a Company Class hierarchy as follows: > > public class Company; > > public class PrivateCompany extends Company; // A Company that has no > train, no tokens, and no tile-laying capability > > public class TrainCompany extends Company; // A Company that can hold > one or more trains and can lay track > > public class CoalCompany extends TrainCompany; // A TrainCompany that > has no Tokens (1837) > > public class TokenCompany extends TrainCompany; // A TrainCompany that > has one or more Tokens > > public class MinorCompany extends TokenCompany; // A TokenCompany that > is a Minor company with Certificates, but has a fixed share price > > public class ShareCompany extends TokenCompany; // A TokenCompany that > is a Major company with Certificates that has flexible price based on > the Market > > This could be extended to a SystemCompany that contains two > ShareCompanies. (1832) > > Does a structure like this make sense to you folks? > There are so many variations on these in different games, I don't think it makes sense to codify the capabilities in the class hierarchy. For example, some minor companies do have stock prices, and some Coal companies do have tokens (1824). I think it is better to have a general Company that gets flags at creation time, and when it is created to fill a particular role those flags are set appropriately according to the game. You also have to consider company transformations during the game, and it seems easiest if it is just one company and you change the capabilities when it transforms. -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |