From: Erik V. <ev...@us...> - 2009-10-07 19:00:49
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9081/rails/game/specific/_1856 Modified Files: CGRFormationRound.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: CGRFormationRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/CGRFormationRound.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CGRFormationRound.java 6 Oct 2009 18:34:03 -0000 1.19 --- CGRFormationRound.java 7 Oct 2009 19:00:38 -0000 1.20 *************** *** 6,10 **** import rails.game.action.*; import rails.game.move.CashMove; - import rails.game.move.MoveSet; import rails.game.state.IntegerState; import rails.util.LocalText; --- 6,9 ---- *************** *** 225,229 **** // TODO Validation skipped for now... ! MoveSet.start(true); PublicCompanyI company = action.getCompany(); --- 224,228 ---- // TODO Validation skipped for now... ! moveStack.start(true); PublicCompanyI company = action.getCompany(); *************** *** 771,779 **** /* End of validation, start of execution */ ! MoveSet.start(true); if (train != null) { ! if (action.isForced()) MoveSet.setLinkedToPrevious(); train.moveTo(pool); --- 770,778 ---- /* End of validation, start of execution */ ! moveStack.start(true); if (train != null) { ! if (action.isForced()) moveStack.setLinkedToPrevious(); train.moveTo(pool); |