You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(46) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(51) |
Feb
(10) |
Mar
|
Apr
|
May
(14) |
Jun
|
Jul
(13) |
Aug
(30) |
Sep
(83) |
Oct
(56) |
Nov
(148) |
Dec
(107) |
2010 |
Jan
(260) |
Feb
(164) |
Mar
(183) |
Apr
(99) |
May
(160) |
Jun
(40) |
Jul
(33) |
Aug
(48) |
Sep
(22) |
Oct
(24) |
Nov
(1) |
Dec
(12) |
2011 |
Jan
(6) |
Feb
(15) |
Mar
(13) |
Apr
(37) |
May
(27) |
Jun
(29) |
Jul
(33) |
Aug
(20) |
Sep
(17) |
Oct
(20) |
Nov
(33) |
Dec
(17) |
2012 |
Jan
(39) |
Feb
(38) |
Mar
(20) |
Apr
(21) |
May
(17) |
Jun
(22) |
Jul
(16) |
Aug
(3) |
Sep
(9) |
Oct
(10) |
Nov
|
Dec
|
From: Erik V. <ev...@us...> - 2009-11-08 10:46:00
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17604/rails/game Modified Files: GameManager.java Log Message: Moved clearing DisplayBuffer ro GameManager. Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** GameManager.java 6 Nov 2009 20:22:20 -0000 1.68 --- GameManager.java 8 Nov 2009 10:45:49 -0000 1.69 *************** *** 634,637 **** --- 634,639 ---- boolean result = true; + + DisplayBuffer.clear(); // The action is null only immediately after Load. |
From: Erik V. <ev...@us...> - 2009-11-08 10:46:00
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17604/rails/ui/swing Modified Files: GameSetupWindow.java Log Message: Moved clearing DisplayBuffer ro GameManager. Index: GameSetupWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameSetupWindow.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GameSetupWindow.java 2 Nov 2009 23:30:35 -0000 1.14 --- GameSetupWindow.java 8 Nov 2009 10:45:49 -0000 1.15 *************** *** 49,57 **** Logger.getLogger(GameSetupWindow.class.getPackage().getName()); ! public GameSetupWindow(/*GameUIManager gameUIManager*/) { super(); - //this.gameUIManager = gameUIManager; - initialize(); populateGridBag(); --- 49,55 ---- Logger.getLogger(GameSetupWindow.class.getPackage().getName()); ! public GameSetupWindow() { super(); initialize(); populateGridBag(); *************** *** 199,207 **** String saveDirectory = Config.get("save.directory"); JFileChooser jfc = new JFileChooser(); ! //if (providedName != null) { ! // jfc.setSelectedFile(new File(providedName)); ! //} else { ! jfc.setCurrentDirectory(new File(saveDirectory)); ! //} if (jfc.showOpenDialog(getContentPane()) == JFileChooser.APPROVE_OPTION) { --- 197,201 ---- String saveDirectory = Config.get("save.directory"); JFileChooser jfc = new JFileChooser(); ! jfc.setCurrentDirectory(new File(saveDirectory)); if (jfc.showOpenDialog(getContentPane()) == JFileChooser.APPROVE_OPTION) { *************** *** 214,219 **** return; } - DisplayBuffer.clear(); - } --- 208,211 ---- |
From: Brett L. <wak...@us...> - 2009-11-08 01:37:55
|
Update of /cvsroot/rails/18xx In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29536 Added Files: build.xml Log Message: Add build.xml. Bump version to 1.0.7-rc1 --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- WARNING: Eclipse auto-generated file. Any modifications will be overwritten. To include a user specific buildfile here, simply create one in the same directory with the processing instruction <?eclipse.ant.import?> as the first entry and export the buildfile again. --> <project basedir="." default="build" name="18xx"> <property environment="env"/> <property name="debuglevel" value="source,lines,vars"/> <property name="target" value="1.6"/> <property name="source" value="1.6"/> <path id="18xx.classpath"> <pathelement location="classes"/> <pathelement location="lib/log4j-1.2/log4j-1.2.14.jar"/> <pathelement location="lib/batik-1.6/batik-rasterizer.jar"/> <pathelement location="lib/batik-1.6/batik.jar"/> </path> <target depends="clean" name="init"> <mkdir dir="classes"/> <copy includeemptydirs="false" todir="classes"> <fileset dir="."> <exclude name="**/*.launch"/> <exclude name="**/*.java"/> </fileset> </copy> </target> <target name="clean"> <delete dir="classes"/> </target> <target depends="clean" name="cleanall"/> <target depends="build-subprojects,build-project,build-jar" name="build"/> <target name="build-subprojects"/> <target depends="init" name="build-project"> <echo message="${ant.project.name}: ${ant.file}"/> <javac debug="true" debuglevel="${debuglevel}" destdir="classes" source="${source}" target="${target}"> <src path="."/> <classpath refid="18xx.classpath"/> </javac> </target> <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/> <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"> <copy todir="${ant.library.dir}"> <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> </copy> <unzip dest="${ant.library.dir}"> <patternset includes="jdtCompilerAdapter.jar"/> <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> </unzip> </target> <target description="compile project with Eclipse compiler" name="build-eclipse-compiler"> <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> <antcall target="build"/> </target> <target name="build-jar"> <jar destfile="rails-1.0.7-rc1.jar" basedir="classes" duplicate="preserve"> <manifest> <attribute name="Main-Class" value="rails.util.RunGame" /> <attribute name="Class-Path" value="./my.properties ./LocalisedText.properties ./lib/log4j-1.2/log4j-1.2.14.jar ./lib/batik-1.6/lib/batik-transcoder.jar ./lib/batik-1.6/batik.jar ./lib/batik-1.6/lib/batik-util.jar ./lib/batik-1.6/lib/batik-script.jar ./lib/batik-1.6/lib/batik-bridge.jar ./lib/batik-1.6/lib/batik-ext.jar ./lib/batik-1.6/lib/batik-awt-util.jar ./lib/batik-1.6/lib/batik-dom.jar ./lib/batik-1.6/lib/batik-gvt.jar" /> </manifest> </jar> </target> <target name="RunGame"> <java classname="rails.util.RunGame" failonerror="true" fork="yes"> <classpath refid="18xx.classpath"/> </java> </target> </project> |
From: Brett L. <wak...@us...> - 2009-11-08 01:37:50
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29536/rails/game Modified Files: Game.java Log Message: Add build.xml. Bump version to 1.0.7-rc1 Index: Game.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Game.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Game.java 5 Nov 2009 22:50:37 -0000 1.35 --- Game.java 8 Nov 2009 01:37:42 -0000 1.36 *************** *** 12,16 **** public class Game { ! public static final String version = "1.0.6+"; /** The component Manager */ --- 12,16 ---- public class Game { ! public static final String version = "1.0.7-rc1"; /** The component Manager */ |
From: Erik V. <ev...@us...> - 2009-11-07 17:23:06
|
Update of /cvsroot/rails/18xx/data/1851 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32181/data/1851 Modified Files: Map.xml Log Message: Added missing city names Index: Map.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1851/Map.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Map.xml 6 Nov 2009 20:18:54 -0000 1.3 --- Map.xml 7 Nov 2009 17:22:44 -0000 1.4 *************** *** 22,26 **** <Hex name="C7" tile="0"/> <Hex name="C9" tile="0" cost="40"/> ! <Hex name="C11" tile="0" cost="40"/> <Hex name="C13" tile="0" cost="40"/> <Hex name="C15" tile="0"/> --- 22,26 ---- <Hex name="C7" tile="0"/> <Hex name="C9" tile="0" cost="40"/> ! <Hex name="C11" tile="0" cost="40" city="Owensboro"/> <Hex name="C13" tile="0" cost="40"/> <Hex name="C15" tile="0"/> *************** *** 46,50 **** <Hex name="E19" tile="0"/> <Hex name="E21" tile="0"/> ! <Hex name="E23" tile="-3" orientation="2" value="40,30,30"/> <Hex name="F4" tile="0" impassable="F6,G5"/> <Hex name="F6" tile="-10" orientation="1" city="Dyersburg"/> --- 46,50 ---- <Hex name="E19" tile="0"/> <Hex name="E21" tile="0"/> ! <Hex name="E23" tile="-3" orientation="2" value="40,30,30" city="Johnson City"/> <Hex name="F4" tile="0" impassable="F6,G5"/> <Hex name="F6" tile="-10" orientation="1" city="Dyersburg"/> *************** *** 90,93 **** <Hex name="J14" tile="0"/> <Hex name="J16" tile="0" cost="60"/> ! <Hex name="J18" tile="-903" orientation="3" value="30,40,50"/> </Map> --- 90,93 ---- <Hex name="J14" tile="0"/> <Hex name="J16" tile="0" cost="60"/> ! <Hex name="J18" tile="-903" orientation="3" value="30,40,50" city="Atlanta"/> </Map> |
From: Erik V. <ev...@us...> - 2009-11-07 17:23:01
|
Update of /cvsroot/rails/18xx/data/18EU In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32181/data/18EU Modified Files: Map.xml Log Message: Added missing city names Index: Map.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18EU/Map.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Map.xml 8 Sep 2009 21:48:09 -0000 1.9 --- Map.xml 7 Nov 2009 17:22:44 -0000 1.10 *************** *** 62,66 **** <Hex name="L7" tile="-10" city="Munich"/> <Hex name="L9" cost="60" tile="0" /> ! <Hex name="L11" tile="-1" city="Brunn"/> <Hex name="L13" tile="0" /> <Hex name="M2" tile="-1" city="Dijon"/> --- 62,66 ---- <Hex name="L7" tile="-10" city="Munich"/> <Hex name="L9" cost="60" tile="0" /> ! <Hex name="L11" tile="-1" city="Brünn"/> <Hex name="L13" tile="0" /> <Hex name="M2" tile="-1" city="Dijon"/> *************** *** 121,124 **** <Hex name="U8" tile="0" /> <Hex name="V5" port="yes" value="10" tile="-901" orientation="4"/> ! <Hex name="V7" label="V" value="30,50" tile="-903" orientation="4"/><!-- Rome --> </Map> --- 121,124 ---- <Hex name="U8" tile="0" /> <Hex name="V5" port="yes" value="10" tile="-901" orientation="4"/> ! <Hex name="V7" label="V" value="30,50" tile="-903" orientation="4" city="Rome"/> </Map> |
From: Erik V. <ev...@us...> - 2009-11-07 17:22:52
|
Update of /cvsroot/rails/18xx/data/18AL In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32181/data/18AL Modified Files: Map.xml Log Message: Added missing city names Index: Map.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18AL/Map.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Map.xml 17 Mar 2008 17:49:42 -0000 1.12 --- Map.xml 7 Nov 2009 17:22:44 -0000 1.13 *************** *** 1,5 **** <Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="A"> <Hex name="A2" tile="0"/> ! <Hex name="A4" tile="-912" orientation="2" value="40,50"/><!--Nashville--> <Hex name="B1" tile="-901" value="40,30" city="Corinth"/> <Hex name="B3" tile="0" impassable="D3"/> --- 1,5 ---- <Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="A"> <Hex name="A2" tile="0"/> ! <Hex name="A4" tile="-912" orientation="2" value="40,50" city="Nashville"/> <Hex name="B1" tile="-901" value="40,30" city="Corinth"/> <Hex name="B3" tile="0" impassable="D3"/> *************** *** 15,19 **** <Hex name="E2" tile="0"/> <Hex name="E4" tile="0"/> ! <Hex name="E6" tile="5" orientation="5"> <Coalfield/> </Hex> --- 15,19 ---- <Hex name="E2" tile="0"/> <Hex name="E4" tile="0"/> ! <Hex name="E6" tile="5" orientation="5" city="Gadsden"> <Coalfield/> </Hex> |
From: Erik V. <ev...@us...> - 2009-11-07 12:10:45
|
Update of /cvsroot/rails/18xx/rails/util In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11324/rails/util Modified Files: Config.java Log Message: Have the working directory as the default for saving/loading files. Index: Config.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/util/Config.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Config.java 5 Nov 2009 22:50:38 -0000 1.8 --- Config.java 7 Nov 2009 12:10:37 -0000 1.9 *************** *** 44,47 **** --- 44,48 ---- load(myConfigFile, false); load(gamesConfigFile, false); + setDefaults(); loaded = true; } *************** *** 76,78 **** --- 77,86 ---- } } + + private static void setDefaults() { + if (!Util.hasValue(prop.getProperty("save.directory"))) { + log.debug("Setting save directory to "+System.getProperty("user.dir")); + prop.put("save.directory", System.getProperty("user.dir")); + } + } } |
From: Erik V. <ev...@us...> - 2009-11-07 12:10:04
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11224/rails/game Modified Files: OperatingRound.java MapHex.java Log Message: Cleanups Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** OperatingRound.java 5 Nov 2009 22:50:37 -0000 1.75 --- OperatingRound.java 7 Nov 2009 12:09:55 -0000 1.76 *************** *** 1008,1012 **** protected void initTurn() { ! System.out.println("---Starting turn of "+operatingCompany.getName()); setCurrentPlayer(operatingCompany.getPresident()); operatingCompany.initTurn(); --- 1008,1012 ---- protected void initTurn() { ! log.debug("Starting turn of "+operatingCompany.getName()); setCurrentPlayer(operatingCompany.getPresident()); operatingCompany.initTurn(); Index: MapHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/MapHex.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** MapHex.java 6 Nov 2009 20:23:53 -0000 1.30 --- MapHex.java 7 Nov 2009 12:09:56 -0000 1.31 *************** *** 189,193 **** if (impassableSides == null) impassableSides = new ArrayList<Integer>(4); impassableSides.add(orientation%6); - log.debug("+++Hex "+name+" is impassable on side "+(orientation%6)); } --- 189,192 ---- |
From: Erik V. <ev...@us...> - 2009-11-07 12:10:03
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11224/rails/ui/swing/hexmap Modified Files: GUIHex.java Log Message: Cleanups Index: GUIHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUIHex.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** GUIHex.java 6 Nov 2009 20:23:53 -0000 1.24 --- GUIHex.java 7 Nov 2009 12:09:55 -0000 1.25 *************** *** 180,184 **** x1, y1, x2, y2); bars.add(bar); - log.debug("--- Added bar "+bar.getName()+" from "+x1+","+y1+" to "+x2+","+y2); } --- 180,183 ---- |
From: Erik V. <ev...@us...> - 2009-11-06 20:24:33
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6335/rails/ui/swing/hexmap Removed Files: BarredHexSide.java Log Message: Removed --- BarredHexSide.java DELETED --- |
From: Erik V. <ev...@us...> - 2009-11-06 20:24:06
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6277/rails/ui/swing/hexmap Modified Files: GUIHex.java HexMap.java Added Files: BarredHexSide.java GUIBar.java Log Message: Display bars to show impassable hex sides Index: GUIHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUIHex.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** GUIHex.java 2 Nov 2009 23:30:35 -0000 1.23 --- GUIHex.java 6 Nov 2009 20:23:53 -0000 1.24 *************** *** 48,51 **** --- 48,52 ---- protected List<TokenI> offStationTokens; + protected List<GUIBar> bars; protected GUIToken provisionalGUIToken = null; *************** *** 168,171 **** --- 169,186 ---- } + public void addBar (int orientation) { + orientation %= 6; + if (bars == null) bars = new ArrayList<GUIBar>(); + int offset = hexMap.getMapManager().getTileOrientation() == MapHex.EW ? 0 : 4; + int x1 = (int)xVertex[(offset+5-orientation)%6]; + int y1 = (int)yVertex[(offset+5-orientation)%6]; + int x2 = (int)xVertex[(offset+6-orientation)%6]; + int y2 = (int)yVertex[(offset+6-orientation)%6]; + GUIBar bar = new GUIBar (model.getName()+":"+orientation, + x1, y1, x2, y2); + bars.add(bar); + log.debug("--- Added bar "+bar.getName()+" from "+x1+","+y1+" to "+x2+","+y2); + } + public Rectangle getBounds() { return rectBound; *************** *** 348,351 **** --- 363,374 ---- } + public void paintBars(Graphics g) { + if (bars == null) return; + Graphics2D g2 = (Graphics2D) g; + for (GUIBar bar : bars) { + bar.drawBar(g2); + } + } + private void paintStationTokens(Graphics2D g2) { if (getHexModel().getCities().size() > 1) { Index: HexMap.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/HexMap.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** HexMap.java 2 Nov 2009 23:30:36 -0000 1.18 --- HexMap.java 6 Nov 2009 20:23:53 -0000 1.19 *************** *** 37,40 **** --- 37,41 ---- protected Map<String, GUIHex> hexesByName = new HashMap<String, GUIHex>(); protected ArrayList<GUIHex> hexes; + protected List<GUIBar> bars = new ArrayList<GUIBar>(); protected int scale = 2 * Scale.get(); protected int cx; *************** *** 67,74 **** --- 68,88 ---- public void setupHexes() { setupHexesGUI(); + setupBars(); addMouseListener(this); addMouseMotionListener(this); } + public void setupBars() { + List<Integer> barSides; + for (GUIHex hex : hexes) { + barSides = hex.getHexModel().getImpassableSides(); + if (barSides != null) { + for (int k : barSides) { + if (k < 3) hex.addBar (k); + } + } + } + } + GUIHex getHexContainingPoint(Point point) { for (GUIHex hex : hexes) { *************** *** 104,107 **** --- 118,132 ---- } } + + // Paint the impassability bars latest + for (GUIHex hex : hexes) { + Rectangle hexrect = hex.getBounds(); + + if (g.hitClip(hexrect.x, hexrect.y, hexrect.width, + hexrect.height)) { + hex.paintBars(g); + } + } + } catch (NullPointerException ex) { // If we try to paint before something is loaded, just retry --- NEW FILE: BarredHexSide.java --- /* $Header: /cvsroot/rails/18xx/rails/ui/swing/hexmap/BarredHexSide.java,v 1.1 2009/11/06 20:23:53 evos Exp $*/ package rails.ui.swing.hexmap; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import org.apache.log4j.Logger; import rails.game.MapHex; import rails.ui.swing.GameUIManager; import rails.ui.swing.ImageLoader; /** * This class represents the GUI version of a tile. */ public class BarredHexSide { protected BufferedImage tileImage = null; protected int rotation = 0; protected double tileScale = GUIHex.NORMAL_SCALE; protected double baseRotation; protected MapHex hex = null; protected int hexSide; protected static ImageLoader imageLoader = GameUIManager.getImageLoader(); protected AffineTransform af = new AffineTransform(); public static final double DEG60 = Math.PI / 3; protected static Logger log = Logger.getLogger(BarredHexSide.class.getPackage().getName()); public BarredHexSide(MapHex hex, int hexSide) { this.hexSide = hexSide; this.hex = hex; if (hex.getTileOrientation() == MapHex.EW) { baseRotation = 0.5 * DEG60; } else { baseRotation = 0.0; } } public void setRotation(int rotation) { this.rotation = rotation % 6; } public int getRotation() { return rotation; } public void setScale(double scale) { tileScale = scale; } public void paintBar(Graphics2D g2, int x, int y) { double radians = baseRotation + rotation * DEG60; int xCenter = (int) Math.round(tileImage.getWidth() * 0.5 * tileScale); int yCenter = (int) Math.round(tileImage.getHeight() * 0.5 * tileScale); af = AffineTransform.getRotateInstance(radians, xCenter, yCenter); af.scale(tileScale, tileScale); RenderingHints rh = new RenderingHints(null); rh.put(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); rh.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); rh.put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); rh.put(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE); rh.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); rh.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); rh.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); AffineTransformOp aop = new AffineTransformOp(af, rh); g2.drawImage(tileImage, aop, x - xCenter, y - yCenter); } } --- NEW FILE: GUIBar.java --- /* $Header: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUIBar.java,v 1.1 2009/11/06 20:23:53 evos Exp $*/ package rails.ui.swing.hexmap; import java.awt.*; /** * This class draws a company's token. */ public class GUIBar { private Color color = Color.BLACK; private int x1, x2; private int y1, y2; private String name; private static final int STROKE_WIDTH = 5; public static final int DEFAULT_LENGTH = 64; public static final int DEFAULT_WIDTH = 12; public static final int DEFAULT_X_COORD = 1; public static final int DEFAULT_Y_COORD = 1; public GUIBar(String name, int x1, int y1, int x2, int y2) { super(); this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; this.name = name; } public void drawBar(Graphics2D g2d) { Color oldColor = g2d.getColor(); Stroke oldStroke = g2d.getStroke(); g2d.setColor(color); g2d.setStroke(new BasicStroke(STROKE_WIDTH)); g2d.drawLine(x1, y1, x2, y2); g2d.setColor(oldColor); g2d.setStroke(oldStroke); } public Color getColor() { return color; } public String getName() { return name; } } |
From: Erik V. <ev...@us...> - 2009-11-06 20:24:05
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6277/rails/game Modified Files: MapManager.java MapHex.java Log Message: Display bars to show impassable hex sides Index: MapHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/MapHex.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** MapHex.java 2 Nov 2009 23:30:36 -0000 1.29 --- MapHex.java 6 Nov 2009 20:23:53 -0000 1.30 *************** *** 79,82 **** --- 79,83 ---- */ protected String impassable = null; + protected List<Integer> impassableSides; protected List<City> cities; *************** *** 183,187 **** --- 184,201 ---- mCities.put(c.getNumber(), c); } + } + + public void addImpassableSide (int orientation) { + if (impassableSides == null) impassableSides = new ArrayList<Integer>(4); + impassableSides.add(orientation%6); + log.debug("+++Hex "+name+" is impassable on side "+(orientation%6)); + } + public List<Integer> getImpassableSides () { + return impassableSides; + } + + public boolean isImpassable (MapHex neighbour) { + return impassable != null && impassable.indexOf(neighbour.getName()) > -1; } Index: MapManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/MapManager.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MapManager.java 2 Nov 2009 23:30:36 -0000 1.12 --- MapManager.java 6 Nov 2009 20:23:53 -0000 1.13 *************** *** 103,110 **** // Initialise the neighbours - /** - * TODO: impassable hexsides. TODO: blank sides of fixed and offboard - * preprinted tiles. - */ for (i = 0; i <= maxX; i++) { for (j = 0; j <= maxY; j++) { --- 103,106 ---- *************** *** 127,130 **** --- 123,130 ---- nb.setNeighbor(k + 3, hex); } + if (hex.isImpassable(nb) || nb.isImpassable(hex)) { + hex.addImpassableSide(k); + //nb.addImpassableSide(k+3); + } } |
From: Erik V. <ev...@us...> - 2009-11-06 20:23:01
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6106/rails/game Modified Files: StockRound.java Log Message: Fix brown share buying cost problem Index: StockRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StockRound.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** StockRound.java 31 Oct 2009 17:08:26 -0000 1.48 --- StockRound.java 6 Nov 2009 20:22:44 -0000 1.49 *************** *** 447,450 **** --- 447,451 ---- PublicCertificateI cert = null; String companyName = company.getName(); + int cost = 0; currentPlayer = getCurrentPlayer(); *************** *** 508,512 **** // Check if the Player has the money. ! if (currentPlayer.getCash() < shares * price) { errMsg = LocalText.getText("NoMoney"); break; --- 509,514 ---- // Check if the Player has the money. ! cost = shares * price; ! if (currentPlayer.getCash() < cost) { errMsg = LocalText.getText("NoMoney"); break; *************** *** 533,538 **** // Transfer the President's certificate ! executeTradeCertificate(cert, currentPlayer.getPortfolio(), ! price * cert.getShares(), priceRecipient); // If more than one certificate is bought at the same time, transfer --- 535,540 ---- // Transfer the President's certificate ! cert.moveTo(currentPlayer.getPortfolio()); ! // If more than one certificate is bought at the same time, transfer *************** *** 540,552 **** for (int i = 1; i < numberOfCertsToBuy; i++) { cert = ipo.findCertificate(company, false); ! executeTradeCertificate(cert, currentPlayer.getPortfolio(), ! company.getIPOPrice(), priceRecipient); } ReportBuffer.add(LocalText.getText("START_COMPANY_LOG", playerName, companyName, Bank.format(price), ! Bank.format(shares * price), shares, cert.getShare(), --- 542,556 ---- for (int i = 1; i < numberOfCertsToBuy; i++) { cert = ipo.findCertificate(company, false); ! cert.moveTo(currentPlayer.getPortfolio()); } + // Pay for these shares + new CashMove (currentPlayer, priceRecipient, cost); + ReportBuffer.add(LocalText.getText("START_COMPANY_LOG", playerName, companyName, Bank.format(price), ! Bank.format(cost), shares, cert.getShare(), *************** *** 587,591 **** String errMsg = null; int price = 0; ! int cash = 0; PublicCompanyI company = null; --- 591,595 ---- String errMsg = null; int price = 0; ! int cost = 0; PublicCompanyI company = null; *************** *** 681,688 **** price = currentSpace.getPrice(); ! cash = shares * price; // Check if the Player has the money. ! if (currentPlayer.getCash() < cash) { errMsg = LocalText.getText("NoMoney"); break; --- 685,692 ---- price = currentSpace.getPrice(); ! cost = shares * price; // Check if the Player has the money. ! if (currentPlayer.getCash() < cost) { errMsg = LocalText.getText("NoMoney"); break; *************** *** 705,709 **** moveStack.start(true); ! CashHolder priceRecipient = getSharePriceRecipient (cert, cash); if (number == 1) { --- 709,713 ---- moveStack.start(true); ! CashHolder priceRecipient = getSharePriceRecipient (cert, cost); if (number == 1) { *************** *** 713,717 **** companyName, from.getName(), ! Bank.format(cash) )); } else { ReportBuffer.add(LocalText.getText("BUY_SHARES_LOG", --- 717,721 ---- companyName, from.getName(), ! Bank.format(cost) )); } else { ReportBuffer.add(LocalText.getText("BUY_SHARES_LOG", *************** *** 722,726 **** companyName, from.getName(), ! Bank.format(cash) )); } ReportBuffer.getAllWaiting(); --- 726,730 ---- companyName, from.getName(), ! Bank.format(cost) )); } ReportBuffer.getAllWaiting(); *************** *** 733,743 **** + "% share in " + from.getName()); } ! executeTradeCertificate(cert2, currentPlayer.getPortfolio(), ! cash, priceRecipient); } if (priceRecipient != from.getOwner()) { ReportBuffer.add(LocalText.getText("PriceIsPaidTo", ! Bank.format(price * shares), priceRecipient.getName() )); } --- 737,747 ---- + "% share in " + from.getName()); } ! cert.moveTo(currentPlayer.getPortfolio()); } + new CashMove (currentPlayer, priceRecipient, cost); if (priceRecipient != from.getOwner()) { ReportBuffer.add(LocalText.getText("PriceIsPaidTo", ! Bank.format(cost), priceRecipient.getName() )); } *************** *** 766,778 **** } ! protected void executeTradeCertificate(Certificate cert, Portfolio newHolder, ! int price, CashHolder priceRecipient) { ! ! cert.moveTo(newHolder); ! new CashMove (newHolder.getOwner(), priceRecipient, price); ! ! } ! ! /** * Who receives the cash when a certificate is bought. * With incremental capitalization, this can be the company treasure. --- 770,774 ---- } ! /** * Who receives the cash when a certificate is bought. * With incremental capitalization, this can be the company treasure. |
From: Erik V. <ev...@us...> - 2009-11-06 20:22:33
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6069/rails/game Modified Files: GameManager.java Log Message: buildinfo Ant script to create BuildInfo.java as a separate Ant job BuildInfo moved to rails.util package Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** GameManager.java 5 Nov 2009 22:50:37 -0000 1.67 --- GameManager.java 6 Nov 2009 20:22:20 -0000 1.68 *************** *** 770,774 **** new ObjectOutputStream(new FileOutputStream(new File( filepath))); ! oos.writeObject(Game.version+" "+BuildInfo.timeStamp); oos.writeObject(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); oos.writeObject(saveFileVersionID); --- 770,774 ---- new ObjectOutputStream(new FileOutputStream(new File( filepath))); ! oos.writeObject(Game.version+" "+BuildInfo.buildDate); oos.writeObject(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); oos.writeObject(saveFileVersionID); |
From: Erik V. <ev...@us...> - 2009-11-06 20:21:54
|
Update of /cvsroot/rails/18xx In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6004 Modified Files: .project Log Message: buildinfo Ant script to create BuildInfo.java as a separate Ant job BuildInfo moved to rails.util package Index: .project =================================================================== RCS file: /cvsroot/rails/18xx/.project,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .project 5 Nov 2009 22:50:38 -0000 1.5 --- .project 6 Nov 2009 20:21:46 -0000 1.6 *************** *** 7,20 **** <buildSpec> <buildCommand> - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>full,incremental,</triggers> - <arguments> - <dictionary> - <key>LaunchConfigHandle</key> - <value><project>/.externalToolBuilders/Create BuildInfo.launch</value> - </dictionary> - </arguments> - </buildCommand> - <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> --- 7,10 ---- |
From: Erik V. <ev...@us...> - 2009-11-06 20:21:33
|
Update of /cvsroot/rails/18xx/rails/test In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5909/rails/test Modified Files: GameTest.java Log Message: Print arguments Index: GameTest.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/test/GameTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GameTest.java 5 Nov 2009 22:50:37 -0000 1.5 --- GameTest.java 6 Nov 2009 20:21:24 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- public static void main(String[] args) { + /* * Check if the property file has been set on the command line. The way *************** *** 31,35 **** System.out.println("Configuration file = " + myConfigFile); ! /* Start the rails.game selector, which will do all the rest. */ new GameSetupWindow(); } --- 32,43 ---- System.out.println("Configuration file = " + myConfigFile); ! int nargs = 0; ! if (args != null && args.length > 0) { ! for (String arg : args) { ! System.out.println ("Arg "+(++nargs)+": "+arg); ! } ! } ! ! /* Start the rails.game selector, which will do all the rest. */ new GameSetupWindow(); } |
From: Erik V. <ev...@us...> - 2009-11-06 20:21:25
|
Update of /cvsroot/rails/18xx/rails/util In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5820/rails/util Added Files: RunGame.java Log Message: New RunGame class to start game and pickup load file argument --- NEW FILE: RunGame.java --- package rails.util; import rails.common.Defs; import rails.game.Game; import rails.game.GameManagerI; import rails.ui.swing.GameSetupWindow; import rails.ui.swing.GameUIManager; public class RunGame { /** The default properties file name */ private static String DEFAULT_CONFIG_FILE = "my.properties"; public static void main(String[] args) { /* * Check if the property file has been set on the command line. The way * to do this is adding an option to the java command: -Dconfigfile=<property-filename> */ String myConfigFile = System.getProperty("configfile"); System.out.println("Cmdline configfile setting = " + myConfigFile); /* If not, use the default configuration file name */ if (!Util.hasValue(myConfigFile)) { myConfigFile = DEFAULT_CONFIG_FILE; } /* * Set the system property that tells log4j to use this file. (Note: * this MUST be done before updating Config) */ System.setProperty("log4j.configuration", myConfigFile); /* Tell the properties loader to read this file. */ Config.setConfigFile(myConfigFile); System.out.println("Configuration file = " + myConfigFile); int nargs = 0; if (args != null && args.length > 0) { nargs = args.length; System.out.println("Number of args: "+nargs); for (String arg : args) { System.out.println ("Arg: "+arg); } } if (nargs >= 1) { loadGame (args); } else { /* Start the rails.game selector, which will do all the rest. */ new GameSetupWindow(); } } static void loadGame (String[] args) { Game game = null; String filepath = args[0]; System.out.println("Starting game from saved file "+filepath); if ((game = Game.load(filepath)) == null) { System.err.println("Loading file "+filepath+" was unsuccessful"); return; } GameManagerI gameManager = game.getGameManager(); GameUIManager gameUIManager; String gameUIManagerClassName = gameManager.getClassName(Defs.ClassName.GAME_UI_MANAGER); try { Class<? extends GameUIManager> gameUIManagerClass = Class.forName(gameUIManagerClassName).asSubclass(GameUIManager.class); gameUIManager = gameUIManagerClass.newInstance(); gameUIManager.init(gameManager); gameUIManager.startLoadedGame(); } catch (Exception e) { System.err.println("Cannot instantiate class " + gameUIManagerClassName + ": "+e.getMessage()); e.printStackTrace(System.err); System.exit(1); } } } |
From: Erik V. <ev...@us...> - 2009-11-06 20:20:47
|
Update of /cvsroot/rails/18xx/rails/util In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5705/rails/util Added Files: BuildInfo.java Log Message: buildinfo Ant script to create BuildInfo.java as a separate Ant job BuildInfo moved to rails.util package --- NEW FILE: BuildInfo.java --- package rails.util; public class BuildInfo { public static final String buildDate = "2009-11-06"; } |
From: Erik V. <ev...@us...> - 2009-11-06 20:20:45
|
Update of /cvsroot/rails/18xx In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5705 Added Files: buildinfo.xml Removed Files: build.xml Log Message: buildinfo Ant script to create BuildInfo.java as a separate Ant job BuildInfo moved to rails.util package --- build.xml DELETED --- --- NEW FILE: buildinfo.xml --- <!-- Generate a java class with the current svn revision number --> <project name="buildinfo " default="makeBuildInfo" basedir="."> <target name="makeBuildInfo" description="Create a BuildInfo source"> <tstamp> <format property="TODAY" pattern="yyyy-MM-dd"/> </tstamp> <!-- the source code of the java class --> <echo file="${basedir}/rails/util/BuildInfo.java"> package rails.util; public class BuildInfo { public static final String buildDate = "${TODAY}"; } </echo> </target> </project> |
From: Erik V. <ev...@us...> - 2009-11-06 20:20:45
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5705/rails/game Removed Files: BuildInfo.java Log Message: buildinfo Ant script to create BuildInfo.java as a separate Ant job BuildInfo moved to rails.util package --- BuildInfo.java DELETED --- |
From: Erik V. <ev...@us...> - 2009-11-06 20:19:12
|
Update of /cvsroot/rails/18xx/data/1851 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5571/data/1851 Modified Files: Map.xml Log Message: Fixed impassable hexsides Index: Map.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1851/Map.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Map.xml 5 Mar 2008 19:55:16 -0000 1.2 --- Map.xml 6 Nov 2009 20:18:54 -0000 1.3 *************** *** 71,75 **** <Hex name="H6" tile="0"/> <Hex name="H8" tile="0" impassable="H10"/> ! <Hex name="H10" tile="0" impsssable="I9,I11"/> <Hex name="H12" tile="0" impassable="I11"/> <Hex name="H14" tile="0" impassable="I15"/> --- 71,75 ---- <Hex name="H6" tile="0"/> <Hex name="H8" tile="0" impassable="H10"/> ! <Hex name="H10" tile="0" impassable="I9,I11"/> <Hex name="H12" tile="0" impassable="I11"/> <Hex name="H14" tile="0" impassable="I15"/> *************** *** 82,86 **** <Hex name="I9" tile="0"/> <Hex name="I11" tile="0"/> ! <Hex name="I13" tile="-10" orientation="4" cost="40" city="Huntsville"/> <Hex name="I15" tile="0"/> <Hex name="I17" tile="0" cost="60"/> --- 82,86 ---- <Hex name="I9" tile="0"/> <Hex name="I11" tile="0"/> ! <Hex name="I13" tile="-10" orientation="4" cost="40" city="Huntsville" impassable="I15"/> <Hex name="I15" tile="0"/> <Hex name="I17" tile="0" cost="60"/> |
From: Erik V. <ev...@us...> - 2009-11-05 22:50:55
|
Update of /cvsroot/rails/18xx/rails/test In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17929/rails/test Modified Files: GameTest.java Log Message: Fixed some bugs: - 1830: free D&H token wasn't free - 18EU: only one 8-train buyable Also added Rails version and date in saved files and reportng in the log of same. Bulld date included in BuildInfo, which is rewritten on each build via a new build.xml Ant script. Index: GameTest.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/test/GameTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GameTest.java 4 May 2009 20:29:14 -0000 1.4 --- GameTest.java 5 Nov 2009 22:50:37 -0000 1.5 *************** *** 1,5 **** package rails.test; ! import rails.ui.swing.*; import rails.util.Config; import rails.util.Util; --- 1,5 ---- package rails.test; ! import rails.ui.swing.GameSetupWindow; import rails.util.Config; import rails.util.Util; *************** *** 32,36 **** /* Start the rails.game selector, which will do all the rest. */ - //new GameUIManager(); new GameSetupWindow(); } --- 32,35 ---- |
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17929/rails/game Modified Files: Portfolio.java StockMarket.java OperatingRound.java TrainType.java Game.java GameManager.java Added Files: BuildInfo.java Log Message: Fixed some bugs: - 1830: free D&H token wasn't free - 18EU: only one 8-train buyable Also added Rails version and date in saved files and reportng in the log of same. Bulld date included in BuildInfo, which is rewritten on each build via a new build.xml Ant script. Index: Portfolio.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Portfolio.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** Portfolio.java 4 Nov 2009 20:33:22 -0000 1.39 --- Portfolio.java 5 Nov 2009 22:50:37 -0000 1.40 *************** *** 373,377 **** public void addTrain(TrainI train) { - trains.add(train); TrainTypeI type = train.getType(); --- 373,376 ---- Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** OperatingRound.java 31 Oct 2009 17:08:27 -0000 1.74 --- OperatingRound.java 5 Nov 2009 22:50:37 -0000 1.75 *************** *** 548,552 **** cost = operatingCompany.getBaseTokenLayCost(); if (stl != null && stl.isFree()) cost = 0; ! // Does the company have the money? if (cost > operatingCompany.getCash()) { --- 548,552 ---- cost = operatingCompany.getBaseTokenLayCost(); if (stl != null && stl.isFree()) cost = 0; ! // Does the company have the money? if (cost > operatingCompany.getCash()) { *************** *** 736,740 **** operatingCompany.addBonus(new Bonus(operatingCompany, sbt.getName(), ! sbt.getValue(), sbt.getLocations())); --- 736,740 ---- operatingCompany.addBonus(new Bonus(operatingCompany, sbt.getName(), ! sbt.getValue(), sbt.getLocations())); Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** GameManager.java 4 Nov 2009 20:33:22 -0000 1.66 --- GameManager.java 5 Nov 2009 22:50:37 -0000 1.67 *************** *** 4,7 **** --- 4,8 ---- import java.io.*; import java.lang.reflect.Constructor; + import java.text.SimpleDateFormat; import java.util.*; *************** *** 151,155 **** protected ReportBuffer reportBuffer; ! protected String name; protected String key; --- 152,156 ---- protected ReportBuffer reportBuffer; ! protected String gmName; protected String key; *************** *** 183,187 **** */ public GameManager() { ! name = GM_NAME; key = GM_KEY; NDC.clear(); --- 184,188 ---- */ public GameManager() { ! gmName = GM_NAME; key = GM_KEY; NDC.clear(); *************** *** 769,774 **** new ObjectOutputStream(new FileOutputStream(new File( filepath))); oos.writeObject(saveFileVersionID); ! oos.writeObject(name); oos.writeObject(gameOptions); oos.writeObject(playerNames); --- 770,777 ---- new ObjectOutputStream(new FileOutputStream(new File( filepath))); + oos.writeObject(Game.version+" "+BuildInfo.timeStamp); + oos.writeObject(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); oos.writeObject(saveFileVersionID); ! oos.writeObject(gameName); oos.writeObject(gameOptions); oos.writeObject(playerNames); *************** *** 1211,1215 **** */ public String getName () { ! return name; } --- 1214,1218 ---- */ public String getName () { ! return gmName; } Index: Game.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Game.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Game.java 30 Oct 2009 21:53:03 -0000 1.34 --- Game.java 5 Nov 2009 22:50:37 -0000 1.35 *************** *** 12,16 **** public class Game { ! public static final String version = "1.0.5"; /** The component Manager */ --- 12,16 ---- public class Game { ! public static final String version = "1.0.6+"; /** The component Manager */ *************** *** 81,84 **** --- 81,85 ---- log.info("========== Start of rails.game " + name + " =========="); + log.info("Rails version "+version); // Have the ComponentManager work through the other rails.game files *************** *** 184,187 **** --- 185,189 ---- log.debug("Loading game from file " + filepath); + String filename = filepath.replaceAll(".*[/\\\\]", ""); try { *************** *** 189,193 **** new ObjectInputStream(new FileInputStream( new File(filepath))); ! long versionID = (Long) ois.readObject(); long saveFileVersionID = GameManager.saveFileVersionID; if (versionID != saveFileVersionID) { --- 191,211 ---- new ObjectInputStream(new FileInputStream( new File(filepath))); ! ! // New in 1.0.7: Rails version & save date/time. ! // Allow for older saved file versions. ! Object object = ois.readObject(); ! if (object instanceof String) { ! log.info("Reading Rails "+(String)object+" saved file "+filename); ! object = ois.readObject(); ! } else { ! log.info("Reading Rails (pre-1.0.7) saved file "+filename); ! } ! if (object instanceof String) { ! log.info("File was saved at "+(String)object); ! object = ois.readObject(); ! } ! ! long versionID = (Long) object; ! log.debug("Saved versionID="+versionID+" (object="+object+")"); long saveFileVersionID = GameManager.saveFileVersionID; if (versionID != saveFileVersionID) { *************** *** 197,200 **** --- 215,219 ---- } String name = (String) ois.readObject(); + log.debug("Saved game="+name); Map<String, String> selectedGameOptions = (Map<String, String>) ois.readObject(); Index: StockMarket.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StockMarket.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** StockMarket.java 31 Oct 2009 17:08:26 -0000 1.21 --- StockMarket.java 5 Nov 2009 22:50:37 -0000 1.22 *************** *** 316,320 **** if (from != null) from.removeToken(company); if (to != null) to.addToken(company); - // company.getCurrentPriceModel().setState(to); } --- 316,319 ---- *************** *** 349,368 **** } - /* Brett's original code */ - - /** - * @return Returns the companiesStarted. - */ - /* - * public ArrayList getCompaniesStarted() { return companiesStarted; } - */ - - /** - * @return Returns the ipoPile. - */ - /* - * public ArrayList getIpoPile() { return ipoPile; } - */ - public PublicCertificate removeShareFromPile(PublicCertificate stock) { if (ipoPile.contains(stock)) { --- 348,351 ---- --- NEW FILE: BuildInfo.java --- package rails.game; public class BuildInfo { public static final String timeStamp="2009/11/05"; } Index: TrainType.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/TrainType.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** TrainType.java 4 Nov 2009 20:33:22 -0000 1.26 --- TrainType.java 5 Nov 2009 22:50:37 -0000 1.27 *************** *** 264,267 **** --- 264,268 ---- log.warn("Unexpected exception", e); } + train.init(this, lastIndex++); return train; } |
From: Erik V. <ev...@us...> - 2009-11-05 22:50:51
|
Update of /cvsroot/rails/18xx/rails/util In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17929/rails/util Modified Files: Config.java Log Message: Fixed some bugs: - 1830: free D&H token wasn't free - 18EU: only one 8-train buyable Also added Rails version and date in saved files and reportng in the log of same. Bulld date included in BuildInfo, which is rewritten on each build via a new build.xml Ant script. Index: Config.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/util/Config.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Config.java 4 Jun 2008 19:00:39 -0000 1.7 --- Config.java 5 Nov 2009 22:50:38 -0000 1.8 *************** *** 2,9 **** package rails.util; ! import java.util.*; ! import java.io.*; ! import org.apache.log4j.*; /** --- 2,9 ---- package rails.util; ! import java.io.FileNotFoundException; ! import java.util.Properties; ! import org.apache.log4j.Logger; /** *************** *** 11,15 **** * a property object from a property file, to retrieve a particular value from * the property file etc. ! * * @author Ramiah Bala, rewritten by Erik Vos * @version 1.0 --- 11,15 ---- * a property object from a property file, to retrieve a particular value from * the property file etc. ! * * @author Ramiah Bala, rewritten by Erik Vos * @version 1.0 *************** *** 53,57 **** /** * This method loads a property file. ! * * @param filename - file key name as a String. * @param required - if TRUE, an exception will be logged if the file does --- 53,57 ---- /** * This method loads a property file. ! * * @param filename - file key name as a String. * @param required - if TRUE, an exception will be logged if the file does *************** *** 73,76 **** --- 73,77 ---- System.err.println(e + " whilst loading properties file " + filename); + e.printStackTrace(System.err); } } |