Update of /cvsroot/rails/18xx/rails/game
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv15333/rails/game
Modified Files:
GameManager.java
Log Message:
Added GameOptions for revenue calculation and route awareness
Index: GameManager.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -d -r1.103 -r1.104
*** GameManager.java 18 May 2010 22:07:18 -0000 1.103
--- GameManager.java 30 May 2010 10:42:39 -0000 1.104
***************
*** 509,514 ****
--- 509,521 ----
}
+ // define guiParameters from gameOptions
if (GameOption.convertValueToBoolean(getGameOption("NoMapMode")))
guiParameters.put(GuiDef.Parm.NO_MAP_MODE, true);
+
+ if (getGameOption("RouteAwareness").equalsIgnoreCase("Highlight"))
+ guiParameters.put(GuiDef.Parm.ROUTE_HIGHLIGHT, true);
+
+ if (getGameOption("RevenueCalculation").equalsIgnoreCase("Suggest"))
+ guiParameters.put(GuiDef.Parm.REVENUE_SUGGEST, true);
}
***************
*** 1328,1332 ****
public String getGameOption (String key) {
! return gameOptions.get(key);
}
--- 1335,1344 ----
public String getGameOption (String key) {
! // check the System properties for overwrites first
! if (Util.hasValue(System.getProperty(key))) {
! return System.getProperty(key);
! } else {
! return gameOptions.get(key);
! }
}
|