From a05307f38a407fbdc48dab9c7a2e7399b840e1cd Mon Sep 17 00:00:00 2001 From: Deathsbreed Date: Wed, 28 May 2014 10:15:20 -0500 Subject: [PATCH] Set version variable to prepare for the next version (I tend to forget that kind of stuff). --- src/spaceshipsim/SimPanel.java | 4 +++- src/spaceshipsim/SpaceShipSim.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/spaceshipsim/SimPanel.java b/src/spaceshipsim/SimPanel.java index 7dfda05..c92d34f 100644 --- a/src/spaceshipsim/SimPanel.java +++ b/src/spaceshipsim/SimPanel.java @@ -16,6 +16,8 @@ import spaceshipsim.entities.*; * */ public class SimPanel extends JPanel implements Runnable, KeyListener { + public final static String version = "v0.3"; + // Graphics/Framework items private Thread gameloop; //private BufferedImage backbuffer; @@ -53,7 +55,7 @@ public class SimPanel extends JPanel implements Runnable, KeyListener { private void drawInfo() { g2d.translate(0, 10); g2d.setColor(Color.WHITE); - g2d.drawString("Welcome to SpaceShipSim v0.2", 10, 10); + g2d.drawString("Welcome to SpaceShipSim " + version, 10, 10); g2d.drawString("Position: " + (int)ship.getX() + ", " + (int)ship.getY(), 10, 25); g2d.drawString("Velocity (px/s): " + (int)(ship.getVelX() * 50) + ", " + (int)(ship.getVelY() * 50), 10, 40); g2d.drawString("Acceleration (px/s/s): " + (int)(ship.getAccelX() * Math.pow(50, 2)) + ", " + (int)(ship.getAccelY() * Math.pow(50, 2)), 10, 55); diff --git a/src/spaceshipsim/SpaceShipSim.java b/src/spaceshipsim/SpaceShipSim.java index 981f6cb..82f864c 100644 --- a/src/spaceshipsim/SpaceShipSim.java +++ b/src/spaceshipsim/SpaceShipSim.java @@ -71,7 +71,7 @@ public class SpaceShipSim { @Override public void actionPerformed(ActionEvent ae) { new Window("License Information", - "SpaceShipSim v0.2, a simulation of a spaceship in a frictionless environment\n" + + "SpaceShipSim " + panel.version + ", a simulation of a spaceship in a frictionless environment\n" + "Copyright (C) 2014 Nicolás A. Ortega\n\n" + "This program is free software: you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + @@ -88,7 +88,7 @@ public class SpaceShipSim { aboutItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { - new Window("About", "SpaceShipSim v0.2\n" + + new Window("About", "SpaceShipSim +" + panel.version + "\n" + "Copyright (C) 2014 Nicolás A. Ortega\n" + "Contact: nicolas.ortega.froysa@gmail.com\n" + "Source-code: https://github.com/Deathsbreed/SpaceShipSim\n" +