From: Stefan F. <ste...@we...> - 2012-02-16 06:21:40
|
Martin: yes both mechanisms co-exists in Rails 1.x, but as far as I know the code adheres to both, so you can rely on the one you prefer. The restriction of the president being the first certificate in the list of certificates of a company will be dropped in Rails 2.0. Stefan On 02/15/2012 09:58 PM, Dr....@t-... wrote: > Hi, > > by accident i stumbled over the hidden design concept thats treated > differently in some routines :) > > At some places in the code the game assumes that the president > certificate is the first in the internal certificate list of a company. > > But in other parts the game code explicitely searches the certificate > list for a certificate with the president attribute set. > > Of course i stumbled over the second code first as it gets used in > Stockround to determine if we start a company by buying a president. > > And the first assumption is used in the subsequent floatCompany to > adjust the UI... > > I can work around that and rework the list of certificates, nevertheless > we should make sure that everyone else subsequently knows about that > behaviour :) > > regards, > > Martin > > P.s. Code snippet: > > PublicCompany.java: > > public Player getPresident() { > if (hasStarted()) { > CashHolder owner = certificates.get(0).getPortfolio().getOwner(); > if (owner instanceof Player) return (Player) owner; > } > return null; > } > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |