From: Erik V. <ev...@us...> - 2009-10-07 19:00:56
|
Update of /cvsroot/rails/18xx/rails/game/specific/_18EU In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9081/rails/game/specific/_18EU Modified Files: FinalMinorExchangeRound.java StartRound_18EU.java StockRound_18EU.java Log Message: Created basic mechanism to allow more games running in parallel at the server side (which itself will not be implemented anytime soon). NDC is used to assign a key to each GameManager. GameManager.getInstance() uses this to find the correct instance. Using this static method to find the GM from anywhere is now 'blessed'. MoveStack added. MoveSet uses the above to have a separate stack per game. Index: StockRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/StockRound_18EU.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** StockRound_18EU.java 25 Sep 2009 19:13:01 -0000 1.24 --- StockRound_18EU.java 7 Oct 2009 19:00:39 -0000 1.25 *************** *** 5,9 **** import rails.game.*; import rails.game.action.*; ! import rails.game.move.*; import rails.game.state.BooleanState; import rails.game.state.IntegerState; --- 5,10 ---- import rails.game.*; import rails.game.action.*; ! import rails.game.move.AddToList; ! import rails.game.move.CashMove; import rails.game.state.BooleanState; import rails.game.state.IntegerState; *************** *** 376,380 **** } ! MoveSet.start(true); // All is OK, now start the company --- 377,381 ---- } ! moveStack.start(true); // All is OK, now start the company *************** *** 493,497 **** // TODO Validation to be added? ! MoveSet.start(true); if (major != null) { --- 494,498 ---- // TODO Validation to be added? ! moveStack.start(true); if (major != null) { *************** *** 636,642 **** /* End of validation, start of execution */ ! MoveSet.start(false); // ! if (action.isForced()) MoveSet.setLinkedToPrevious(); pool.buyTrain(train, 0); --- 637,643 ---- /* End of validation, start of execution */ ! moveStack.start(false); // ! if (action.isForced()) moveStack.setLinkedToPrevious(); pool.buyTrain(train, 0); Index: StartRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/StartRound_18EU.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StartRound_18EU.java 15 Jan 2009 20:53:28 -0000 1.7 --- StartRound_18EU.java 7 Oct 2009 19:00:39 -0000 1.8 *************** *** 4,8 **** import rails.game.*; import rails.game.action.*; - import rails.game.move.MoveSet; import rails.game.state.IntegerState; import rails.game.state.State; --- 4,7 ---- *************** *** 145,149 **** } ! MoveSet.start(false); assignItem(player, item, price, 0); --- 144,148 ---- } ! moveStack.start(false); assignItem(player, item, price, 0); *************** *** 229,233 **** } ! MoveSet.start(false); if (getStep() == SELECT_STEP) { --- 228,232 ---- } ! moveStack.start(false); if (getStep() == SELECT_STEP) { *************** *** 294,298 **** ReportBuffer.add(LocalText.getText("PASSES", playerName)); ! MoveSet.start(false); StartItem auctionedItem = (StartItem) currentAuctionItem.getObject(); --- 293,297 ---- ReportBuffer.add(LocalText.getText("PASSES", playerName)); ! moveStack.start(false); StartItem auctionedItem = (StartItem) currentAuctionItem.getObject(); Index: FinalMinorExchangeRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/FinalMinorExchangeRound.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FinalMinorExchangeRound.java 15 Jan 2009 20:53:28 -0000 1.7 --- FinalMinorExchangeRound.java 7 Oct 2009 19:00:38 -0000 1.8 *************** *** 7,11 **** import rails.game.action.MergeCompanies; import rails.game.action.NullAction; - import rails.game.move.MoveSet; import rails.util.LocalText; --- 7,10 ---- *************** *** 95,99 **** public boolean done(String playerName) { ! MoveSet.start(false); for (PublicCompanyI comp : Game.getCompanyManager().getAllPublicCompanies()) { --- 94,98 ---- public boolean done(String playerName) { ! moveStack.start(false); for (PublicCompanyI comp : Game.getCompanyManager().getAllPublicCompanies()) { |