From: Stefan F. <ste...@we...> - 2014-08-22 13:50:29
|
Mike: I cannot recommend to create StartItems on the fly, as all of them have to be available at the start of the game to allow reloading a saved game file. One of the troubles of using the serialization process of Java for storing the game is the fact that all objects have to be either created before game start or can be created during the load process. All this happens before any action gets replayed. This can be changed as soon as we change it to a format that can be loaded step by step. My suggestion is that you create all possible StartItem at game creation (maybe even preferable by specific code instead of xml) and then for each Parliament Round collect the available StartItems for that round. I am not really happy about the implementation to reserve certificates inside StartItem, so expect something to change there in the not-so-far future. StartRounds will be first Round types to be changed as soon as I have time for that (as soon as 2.0 is out of the door). Thus keep it simple for the time being and do not care about UI issues for the time being. Stefan Remark: Another issue I realized that there is still one place that there is one class variable remaining: "startItemMap" of StartItem class. This will be changed soon, however it will not have any consequence to your problem. On 08/22/2014 02:36 PM, Michael Alexander wrote: > I'm using the existing "StartRound" classes for the Parliament Rounds > for 1862. It seems to be ok to create StartItems on the fly based on > what companies are available, dropping the Presidencies of each of those > companies into the appropriate StartItem. My only concern is that each > of those companies then shows up in the Status Panel as having "70%" in > the IPO, which I think might be confusing. > > I'm thinking of making "proxy certs" to put into the StartItems and > moving the real ones inside the "buy" function. Is that a reasonable > approach? > > Mike > > > ------------------------------------------------------------------------------ > 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 > |