From: Erik V. <ev...@us...> - 2009-09-12 19:48:49
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16351/rails/ui/swing Modified Files: ORPanel.java GameStatus.java GameUIManager.java Log Message: Simplified Defs.ClassName and Defs.Parm handling Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GameUIManager.java 4 May 2009 20:29:15 -0000 1.17 --- GameUIManager.java 12 Sep 2009 19:48:39 -0000 1.18 *************** *** 525,535 **** } ! public Object getCommonParameter (Defs.Parm key) { ! return gameManager.getCommonParameter(key); } ! public boolean getCommonParameterAsBoolean (Defs.Parm key) { ! ! return (Boolean) getCommonParameter(key); } --- 525,534 ---- } ! public Object getGameParameter (Defs.Parm key) { ! return gameManager.getGameParameter(key); } ! public boolean getGameParameterAsBoolean (Defs.Parm key) { ! return (Boolean) getGameParameter(key); } Index: GameStatus.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameStatus.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** GameStatus.java 4 Sep 2009 18:35:53 -0000 1.26 --- GameStatus.java 12 Sep 2009 19:48:39 -0000 1.27 *************** *** 155,162 **** nc = companies.length; ! hasParPrices = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.HAS_ANY_PAR_PRICE); ! compCanBuyPrivates = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.CAN_ANY_COMPANY_BUY_PRIVATES); ! compCanHoldOwnShares = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.CAN_ANY_COMPANY_HOLD_OWN_SHARES); ! hasCompanyLoans = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.HAS_ANY_COMPANY_LOANS); ipo = Bank.getIpo(); --- 155,162 ---- nc = companies.length; ! hasParPrices = gameUIManager.getGameParameterAsBoolean(Defs.Parm.HAS_ANY_PAR_PRICE); ! compCanBuyPrivates = gameUIManager.getGameParameterAsBoolean(Defs.Parm.CAN_ANY_COMPANY_BUY_PRIVATES); ! compCanHoldOwnShares = gameUIManager.getGameParameterAsBoolean(Defs.Parm.CAN_ANY_COMPANY_HOLD_OWN_SHARES); ! hasCompanyLoans = gameUIManager.getGameParameterAsBoolean(Defs.Parm.HAS_ANY_COMPANY_LOANS); ipo = Bank.getIpo(); Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ORPanel.java 2 Sep 2009 21:47:47 -0000 1.32 --- ORPanel.java 12 Sep 2009 19:48:39 -0000 1.33 *************** *** 138,144 **** round = gameUIManager.getCurrentRound(); ! privatesCanBeBought = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.CAN_ANY_COMPANY_BUY_PRIVATES); ! bonusTokensExist = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.DO_BONUS_TOKENS_EXIST); ! hasCompanyLoans = gameUIManager.getCommonParameterAsBoolean(Defs.Parm.HAS_ANY_COMPANY_LOANS); initButtonPanel(); --- 138,144 ---- round = gameUIManager.getCurrentRound(); ! privatesCanBeBought = gameUIManager.getGameParameterAsBoolean(Defs.Parm.CAN_ANY_COMPANY_BUY_PRIVATES); ! bonusTokensExist = gameUIManager.getGameParameterAsBoolean(Defs.Parm.DO_BONUS_TOKENS_EXIST); ! hasCompanyLoans = gameUIManager.getGameParameterAsBoolean(Defs.Parm.HAS_ANY_COMPANY_LOANS); initButtonPanel(); |