From: Erik V. <ev...@us...> - 2010-01-01 18:58:04
|
Update of /cvsroot/rails/18xx/rails/game/action In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20157/rails/game/action Modified Files: PossibleActions.java Log Message: Always allow SAVE Index: PossibleActions.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/action/PossibleActions.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PossibleActions.java 25 Sep 2009 19:13:01 -0000 1.14 --- PossibleActions.java 1 Jan 2010 18:57:56 -0000 1.15 *************** *** 87,90 **** --- 87,97 ---- public boolean validate(PossibleAction checkedAction) { + // Save is always allowed + if (checkedAction instanceof GameAction + && ((GameAction)checkedAction).getMode() == GameAction.SAVE) { + return true; + } + + // Check if action accurs in the list of possible actions for (PossibleAction action : possibleActions) { if (action.equals(checkedAction)) { |