mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed build. (Actually this time)
All doc string annotations were required to be fixed for all methods tags: #issue[34]
This commit is contained in:
@@ -12,9 +12,16 @@ public class MarkRoundingMessage extends Message{
|
||||
private RoundingSide roundingSide;
|
||||
private long markId;
|
||||
|
||||
|
||||
/**
|
||||
* This message is sent when a boat passes a mark, start line, or finish line
|
||||
* The purpose of this is to record the time when yachts cross marks
|
||||
* @param ackNumber ackNumber
|
||||
* @param raceId raceId
|
||||
* @param sourceId sourceId
|
||||
* @param roundingBoatStatus roundingBoatStatus
|
||||
* @param roundingSide roundingSide
|
||||
* @param markId markId
|
||||
*/
|
||||
public MarkRoundingMessage(int ackNumber, int raceId, int sourceId, RoundingBoatStatus roundingBoatStatus,
|
||||
RoundingSide roundingSide, int markId){
|
||||
|
||||
@@ -172,7 +172,7 @@ public abstract class Message {
|
||||
* Convert an integer to an array of bytes
|
||||
* @param val The value to add
|
||||
* @param len The width of the integer in the buffer
|
||||
* @return
|
||||
* @return A byte array to be sent
|
||||
*/
|
||||
public static byte[] intToByteArray(long val, int len){
|
||||
int index = 0;
|
||||
@@ -191,6 +191,7 @@ public abstract class Message {
|
||||
* takes an array of up to 7 bytes in little endian format and
|
||||
* returns a positive long constructed from the input bytes
|
||||
*
|
||||
* @param bytes the bytes to be converted to long
|
||||
* @return a positive long if there is less than 8 bytes -1 otherwise
|
||||
*/
|
||||
public static long bytesToLong(byte[] bytes){
|
||||
|
||||
@@ -17,6 +17,7 @@ public class XMLMessage extends Message{
|
||||
* XML Message from the AC35 Streaming data spec
|
||||
* @param content The XML content
|
||||
* @param type The XML Message Sub Type
|
||||
* @param sequenceNum sequenceNum
|
||||
*/
|
||||
public XMLMessage(String content, XMLMessageSubType type, long sequenceNum){
|
||||
this.content = content;
|
||||
|
||||
@@ -26,6 +26,7 @@ public final class PolarTable {
|
||||
* Iterates through each row of the polar table, in pairs, to extract the row into a hashmap of angle to boat speed.
|
||||
* These angle boatspeed hashmaps are then added to an outer hashmap at the end of wind speed key to each row hashmap
|
||||
* as a value
|
||||
* @param polarFile polarFile to be parsed
|
||||
*/
|
||||
public static void parsePolarFile(InputStream polarFile) {
|
||||
polarTable = new HashMap<>();
|
||||
|
||||
@@ -85,8 +85,10 @@ public class Yacht {
|
||||
|
||||
/**
|
||||
* Used in EventTest and RaceTest.
|
||||
*
|
||||
* @param boatName Create a yacht object with name.
|
||||
* @param boatName boatName
|
||||
* @param shortName shortName
|
||||
* @param location location
|
||||
* @param heading heading
|
||||
*/
|
||||
public Yacht(String boatName, String shortName, GeoPoint location, Double heading) {
|
||||
this.boatName = boatName;
|
||||
@@ -103,6 +105,7 @@ public class Yacht {
|
||||
* @param boatName The name of the team sailing the boat
|
||||
* @param boatVelocity The speed of the boat in meters/second
|
||||
* @param shortName A shorter version of the teams name
|
||||
* @param id The id for the yacht
|
||||
*/
|
||||
public Yacht(String boatName, double boatVelocity, String shortName, int id) {
|
||||
this.boatName = boatName;
|
||||
|
||||
@@ -413,6 +413,7 @@ public class StreamParser {
|
||||
* takes an array of up to 7 bytes and returns a positive
|
||||
* long constructed from the input bytes
|
||||
*
|
||||
* @param bytes the byte array to conver to Long
|
||||
* @return a positive long if there is less than 7 bytes -1 otherwise
|
||||
*/
|
||||
public static long bytesToLong(byte[] bytes) {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ClientToServerThread implements Runnable {
|
||||
*
|
||||
* @param ipAddress a string of ip address to be connected to
|
||||
* @param portNumber an integer port number
|
||||
* @throws Exception SocketConnection if fail to connect to ip address and port number
|
||||
* @throws IOException SocketConnection if fail to connect to ip address and port number
|
||||
* combination
|
||||
*/
|
||||
public ClientToServerThread(String ipAddress, Integer portNumber) throws IOException {
|
||||
@@ -182,6 +182,7 @@ public class ClientToServerThread implements Runnable {
|
||||
|
||||
/**
|
||||
* Send the post-start race course information
|
||||
* @param boatActionMessage The message to send
|
||||
*/
|
||||
public void sendBoatActionMessage(BoatActionMessage boatActionMessage) {
|
||||
try {
|
||||
|
||||
@@ -277,6 +277,7 @@ public class GameClient {
|
||||
|
||||
/**
|
||||
* Handle the key-pressed event from the text field.
|
||||
* @param e The key event triggering this call
|
||||
*/
|
||||
public void keyPressed(KeyEvent e) {
|
||||
BoatActionMessage boatActionMessage;
|
||||
|
||||
@@ -183,6 +183,7 @@ public class GameView extends Pane {
|
||||
* case the course is added relative ot the border.
|
||||
*
|
||||
* @param newCourse the mark objects that make up the course.
|
||||
* @param sequence The sequence the marks travel through
|
||||
*/
|
||||
public void updateCourse(List<CompoundMark> newCourse, List<Corner> sequence) {
|
||||
markerObjects = new HashMap<>();
|
||||
@@ -307,6 +308,7 @@ public class GameView extends Pane {
|
||||
|
||||
/**
|
||||
* Draws all the boats.
|
||||
* @param yachts The yachts to set in the race
|
||||
*/
|
||||
public void setBoats(List<Yacht> yachts) {
|
||||
BoatObject newBoat;
|
||||
|
||||
@@ -108,6 +108,8 @@ public class BoatObject extends Group {
|
||||
*
|
||||
* @param x The X coordinate to move the boat to
|
||||
* @param y The Y coordinate to move the boat to
|
||||
* @param rotation The rotation by which the boat moves
|
||||
* @param velocity The velocity the boat is moving
|
||||
*/
|
||||
public void moveTo(double x, double y, double rotation, double velocity) {
|
||||
Double dx = Math.abs(boatPoly.getLayoutX() - x);
|
||||
|
||||
Reference in New Issue
Block a user