Skip to content

Commit

Permalink
Resolves #69 - Aligned JavaDoc Since/Version to Server Version Numbers.
Browse files Browse the repository at this point in the history
Since indicates when the client class was added to the corresponding server code.
Version indicates the most recent change to a file for compatibility with a specific version of the server.
  • Loading branch information
hawkerm committed Apr 20, 2016
1 parent bb26eaa commit 14ec8f2
Show file tree
Hide file tree
Showing 32 changed files with 89 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Michael A. Hawker
*
* @since 2.0
* @since 1.0
* @version 1.0
*/
public class BasicEnvironment extends Environment<BasicGameInfo> {
Expand Down
4 changes: 2 additions & 2 deletions java_client_src/src/ihs/apcs/spacebattle/BasicGameInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Michael A. Hawker
*
* @since 2.0
* @since 1.0
* @version 1.1
*/
public class BasicGameInfo {
Expand Down Expand Up @@ -50,7 +50,7 @@ public class BasicGameInfo {
* Gets a string representing the last thing that destroyed your ship.
*
* @return name of a player or type of an object with its #ID number
* @since 1.1
* @since 1.0.1
*/
public String getLastDestroyedBy() { return LSTDSTRBY; }

Expand Down
4 changes: 2 additions & 2 deletions java_client_src/src/ihs/apcs/spacebattle/BasicSpaceship.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
* @author Michael A. Hawker
*
* @since 2.0
* @version 1.0
* @since 1.0
* @version 1.0.1
*/
public abstract class BasicSpaceship implements Spaceship<BasicGameInfo> {

Expand Down
5 changes: 3 additions & 2 deletions java_client_src/src/ihs/apcs/spacebattle/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
* the current state of your ship and the world.
* The Environment may contain additional information based on performing other commands like {@link ihs.apcs.spacebattle.commands.RadarCommand }.
* @author Brett Wortzman
* @version 2.0
* @since 1.0
*
* @since 0.1
* @version 1.0
*
* @param <T> specify the corresponding Game class to that being played on the server. Corresponds to the same class used by the {@link ihs.apcs.spacebattle.Spaceship} interface.
*/
Expand Down
13 changes: 10 additions & 3 deletions java_client_src/src/ihs/apcs/spacebattle/ObjectStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* and the status of other objects found by a level 5 (fully-detailed) radar sweep.
* @author Brett Wortzman
*
* @version 2.0
* @since 1.0
* @since 0.1
* @version 1.1
*/
public class ObjectStatus {
// Fields
Expand Down Expand Up @@ -47,7 +47,7 @@ public class ObjectStatus {
private double VALUE; // Bubble, Bauble or Ship Only
private int NUMSTORED; // Ship Only - Number of Baubles Carried
private double HITRADIUS; // Round Only
private boolean SUCCESS; // Game boolean for success for this object
private boolean SUCCESS; // Game boolean for success for this object

private int PULL; // Planet/BlackHole/Nebula Only
private int MAJOR; // Planet/BlackHole/Nebula Only
Expand Down Expand Up @@ -168,13 +168,17 @@ public class ObjectStatus {
* Is this object in a celestial object's body of effect?
* @return true if a ship is in a celestial body's main area of effect (could be false but in gravity well still {@link #getAxisMajorLength()}).
* A celestial body will return true if it contains an object like a ship.
*
* @since 1.1
*/
public boolean isInCelestialBody() { return INBODY; }

/**
* Was an object successfully scanned for a game? (Discovery Quest)
* @return true if this object has a value of success for the current game.
* i.e. Successfully scanned in Discovery Quest.
*
* @since 1.1
*/
public boolean isSuccessful() { return SUCCESS; }

Expand All @@ -199,6 +203,7 @@ public class ObjectStatus {
/**
* Gets the strength of the gravity or drag of a Planet, BlackHole or Nebula. A higher number represents a stronger effect.
* @return pull value.
* @since 1.0
*/
public int getPullStrength() { return PULL; }
/**
Expand All @@ -208,12 +213,14 @@ public class ObjectStatus {
* <p>
* For Nebula this length is oriented in the Nebula's direction/rotation see {@link #getOrientation() } and represents its major radius. If your ship is in the Nebula, it will slow down based on the {@link #getPullStrength()} amount.
* @return the elliptical radius along the parallel axis
* @since 1.0
*/
public int getAxisMajorLength() { return MAJOR; }

/**
* Gets the length from the center of a Nebula that is perpendicular to the direction/rotation of the Nebula.
* @return the elliptical radius along the perpendicular axis
* @since 1.0
*/
public int getAxisMinorLength() { return MINOR; }

Expand Down
4 changes: 3 additions & 1 deletion java_client_src/src/ihs/apcs/spacebattle/Point.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* Represents a point in space as an (x, y) coordinate.
* @author Brett Wortzman
*
*
* @since 0.1
* @version 0.1
*/
public class Point {
private double x;
Expand Down
2 changes: 2 additions & 0 deletions java_client_src/src/ihs/apcs/spacebattle/RadarResults.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* by the radar sweep will result in a zero-equivalent value.
* @author Brett Wortzman
* @see ihs.apcs.spacebattle.commands.RadarCommand
* @since 0.1
* @version 0.1
*/
public class RadarResults extends ArrayList<ObjectStatus> {
private static final long serialVersionUID = -5552710352589416751L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* receiving commands.
* @author Brett Wortzman
*
* @since 0.1
* @version 0.1
*/
public class RegistrationData {
private String NAME;
Expand Down
8 changes: 4 additions & 4 deletions java_client_src/src/ihs/apcs/spacebattle/Spaceship.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* </ol>
*
* @author Brett Wortzman
* @version 2.0
* @since 1.0
* @since 0.1
* @version 1.1
*
* @param <T> the Game class being used by the server. Will correspond to the type of information retrieved by the {@link Environment} class.
*/
Expand Down Expand Up @@ -53,8 +53,8 @@ public interface Spaceship<T> {
/**
* Notifies a ship that it has been destroyed and respawned. Ships can use this to track their deaths.
*
* @version 1.2
* @since 1.1
* @since 0.95
* @version 1.1
*
* @param lastDestroyedBy string containing the name of the player's ship or the object type name and #ID of the entity which destroyed your ship.
*/
Expand Down
2 changes: 2 additions & 0 deletions java_client_src/src/ihs/apcs/spacebattle/TextClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* Simple, text-based test client for SpaceBattle game for IHS AP CS 2012.
* @author Brett Wortzman
*
* @since 0.1
* @version 1.1
*/
public class TextClient implements Client {
private PrintStream logStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* Will deplete energy by 40 and health by 50%.
* @author Brett Wortzman
*
* @since 0.9
* @version 1.1
*/
public class AllStopCommand extends ShipCommand {

Expand All @@ -28,7 +30,7 @@ protected String getName() {
/**
* AllStop executes immediately.
*
* @since 2.0
* @since 1.1
* @return true
*/
public static boolean executesImmediately() { return true; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* A command to cause a ship to gradually slow down from its current speed.
* @author Brett Wortzman
*
* @since 0.1
* @version 0.1
*/
public class BrakeCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Cloaking is a non-blocking operation.
* @author Brett Wortzman
*
* @since 0.9
* @version 1.1
*/
public class CloakCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down Expand Up @@ -42,7 +44,7 @@ protected String getName() {
/**
* Cloaking does not block the processing of other commands.
*
* @since 2.0
* @since 1.1
* @return false, cloak doesn't block.
*/
public static boolean isBlocking() { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* beacons directly.
* @author Brett Wortzman
*
* @since 0.1
* @version 1.1
*/
public class DeployLaserBeaconCommand extends ShipCommand {

Expand All @@ -24,7 +26,7 @@ protected String getName() {
/**
* Deploy Laser Beacons executes immediately.
*
* @since 2.0
* @since 1.1
* @return true
*/
public static boolean executesImmediately() { return true; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* has the effect of clearing all lines you have drawn.
* @author Brett Wortzman
*
* @since 0.1
* @version 1.1
*/
public class DestroyAllLaserBeaconsCommand extends ShipCommand {

Expand All @@ -19,7 +21,7 @@ protected String getName() {
/**
* Destroy Laser Beacons execute immediately.
*
* @since 2.0
* @since 1.1
* @return true
*/
public static boolean executesImmediately() { return true; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* back of a ship.
* @author Brett Wortzman
*
* @since 0.9
* @version 1.1
*/
public class FireTorpedoCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down Expand Up @@ -33,7 +35,7 @@ protected String getName() {
/**
* Fire Torpedo executes immediately.
*
* @since 2.0
* @since 1.1
* @return true
*/
public static boolean executesImmediately() { return true; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* data without performing an action.
* @author Brett Wortzman
*
* @since 0.1
* @version 0.1
*/
public class IdleCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
* @author Michael A. Hawker
*
* @since 1.1
* @version 1.1
*/
public class LowerEnergyScoopCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down Expand Up @@ -48,7 +50,6 @@ protected String getName() {
/**
* Scooping does not block the processing of other commands.
*
* @since 2.0
* @return false, scooping doesn't block.
*/
public static boolean isBlocking() { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* </table>
*
* @author Brett Wortzman
* @since 0.1
* @version 0.1
*/
public class RadarCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Raising shields is a non-blocking operation.
* @author Brett Wortzman
*
* @since 0.9
* @version 1.1
*/
public class RaiseShieldsCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down Expand Up @@ -45,6 +47,7 @@ protected String getName() {
/**
* Raising Shields does not block the processing of other commands.
*
* @since 1.1
* @return false, raising shields doesn't block.
*/
public static boolean isBlocking() { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Repairing is a non-blocking operation.
* @author Brett Wortzman
*
* @since 0.9
* @version 1.1
*/
public class RepairCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down Expand Up @@ -36,7 +38,7 @@ protected String getName() {
/**
* Repairing does not block the processing of other commands.
*
* @since 2.0
* @since 1.1
* @return false, repairing doesn't block.
*/
public static boolean isBlocking() { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* counter-clockwise; negative rotations are clockwise
* @author Brett Wortzman
*
* @since 0.1
* @version 0.1
*/
public class RotateCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* <p>Scanning is a non-blocking operation.
*
* @author Michael A. Hawker
* @since 1.1
* @version 1.1
*/
public class ScanCommand extends ShipCommand {
@SuppressWarnings("unused")
Expand Down Expand Up @@ -47,7 +49,6 @@ protected String getName() {
/**
* Scanning does not block the processing of other commands.
*
* @since 2.0
* @return false, scanning doesn't block.
*/
public static boolean isBlocking() { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* client and interpreted as a request to disconnect rather than send a new command.</i>
* @author Brett Wortzman
*
* @since 0.1
* @version 0.1
*/
public class SelfDestructCommand extends ShipCommand {

Expand Down
Loading

0 comments on commit 14ec8f2

Please sign in to comment.