From: brett l. <wak...@gm...> - 2007-10-03 15:33:53
|
I haven't really had much time to review all of these changes. I'm moving in two weeks, so all of my free time is going towards that. So far, this all looks great. This will help make providing a coherent UI much much easier. ---Brett On 9/30/07, Erik Vos <eri...@hc...> wrote: > The main goal of the current changes was to clean up the game start code. > The entry points are now all part of class Game. > > The sequence is: > > 1. Call the Game constructor, passing all variables: > > public Game (String name, List<String> players, Map<String, String> > options) > > All steps to define players and to set game options must have been completed > beforehand (all required info is in Games.xml). > > 2. Let the game initialise itself by reading and parsing its XML: > > public boolean setup(); > > which returns false if some configuration exception is raised. > > 3. Start the game: > > public void start(); > > A fourth entry point enables a complete startup from a previously > saved game: > > public static boolean load (String filepath); > > which calls the above three methods. > The separation between steps 2 and 3 is needed because load() > needs to replay the actions of the saved game in between these steps. > > > Several classed involved in game startup have been simplified > as a result of these changes, notably Game, GameManager and > PlayerManager. > The code in the startup UI class Options has not yet been changed > except to use the new interface, but I expect it could also be > simplified, depending on how its final UI will be constructed like. > > Erik Vos > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |