From: Erik V. <ev...@us...> - 2009-10-31 17:08:38
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12071/rails/ui/swing/hexmap Modified Files: EWHexMap.java HexMap.java NSHexMap.java Log Message: More rationalising of static method usage Index: NSHexMap.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/NSHexMap.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NSHexMap.java 4 May 2009 20:29:15 -0000 1.7 --- NSHexMap.java 31 Oct 2009 17:08:27 -0000 1.8 *************** *** 26,31 **** scale = Scale.get(); ! MapManager mmgr = MapManager.getInstance(); ! hexArray = mmgr.getHexes(); MapHex mh; h = new GUIHex[hexArray.length][hexArray[0].length]; --- 26,30 ---- scale = Scale.get(); ! hexArray = MapManager.getInstance().getHexes(); MapHex mh; h = new GUIHex[hexArray.length][hexArray[0].length]; *************** *** 35,39 **** if (mh != null) { GUIHex hex = ! new GUIHex(this, (int) Math.round(cx + 3 * i * scale), (int) Math.round(cy + (2 * j + (i & 1)) --- 34,38 ---- if (mh != null) { GUIHex hex = ! new GUIHex(this, Math.round(cx + 3 * i * scale), (int) Math.round(cy + (2 * j + (i & 1)) Index: EWHexMap.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/EWHexMap.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EWHexMap.java 4 May 2009 20:29:15 -0000 1.8 --- EWHexMap.java 31 Oct 2009 17:08:27 -0000 1.9 *************** *** 23,28 **** hexes = new ArrayList<GUIHex>(); ! MapManager mmgr = MapManager.getInstance(); ! hexArray = mmgr.getHexes(); MapHex mh; h = new GUIHex[hexArray.length][hexArray[0].length]; --- 23,27 ---- hexes = new ArrayList<GUIHex>(); ! hexArray = MapManager.getInstance().getHexes(); MapHex mh; h = new GUIHex[hexArray.length][hexArray[0].length]; Index: HexMap.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/HexMap.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** HexMap.java 8 Sep 2009 21:48:58 -0000 1.16 --- HexMap.java 31 Oct 2009 17:08:27 -0000 1.17 *************** *** 13,16 **** --- 13,17 ---- import rails.game.MapHex; + import rails.game.MapManager; import rails.game.PhaseI; import rails.game.action.*; *************** *** 29,32 **** --- 30,34 ---- protected ORUIManager orUIManager; + //protected MapManager mapManager; // Abstract Methods *************** *** 63,66 **** --- 65,69 ---- public void setORUIManager(ORUIManager orUIManager) { this.orUIManager = orUIManager; + //this.mapManager = orUIManager.getGameUIManager().getGameManager().getMapManager(); } |