mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Final commit for yacht refactor
tags: #story[1124] #pair[hyi25, wmu16]
This commit is contained in:
+5
-4
@@ -20,15 +20,16 @@ import seng302.model.mark.CompoundMark;
|
||||
* compared to the XMLParser boat class, also done outside Boat class because some old variables are
|
||||
* not used anymore.
|
||||
*/
|
||||
public class Yacht extends Observable {
|
||||
public class ClientYacht extends Observable {
|
||||
|
||||
@FunctionalInterface
|
||||
public interface YachtLocationListener {
|
||||
|
||||
void notifyLocation(Yacht yacht, double lat, double lon, double heading, double velocity);
|
||||
void notifyLocation(ClientYacht clientYacht, double lat, double lon, double heading,
|
||||
double velocity);
|
||||
}
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(Yacht.class);
|
||||
private Logger logger = LoggerFactory.getLogger(ClientYacht.class);
|
||||
|
||||
|
||||
//BOTH AFAIK
|
||||
@@ -58,7 +59,7 @@ public class Yacht extends Observable {
|
||||
private Integer positionInt = 0;
|
||||
private Color colour;
|
||||
|
||||
public Yacht(String boatType, Integer sourceId, String hullID, String shortName,
|
||||
public ClientYacht(String boatType, Integer sourceId, String hullID, String shortName,
|
||||
String boatName, String country) {
|
||||
this.boatType = boatType;
|
||||
this.sourceId = sourceId;
|
||||
@@ -16,7 +16,7 @@ import seng302.utilities.GeoUtility;
|
||||
*/
|
||||
public class ServerYacht extends Observable {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(Yacht.class);
|
||||
private Logger logger = LoggerFactory.getLogger(ClientYacht.class);
|
||||
|
||||
public static final Double TURN_STEP = 5.0;
|
||||
|
||||
@@ -264,18 +264,16 @@ public class ServerYacht extends Observable {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
// TODO: 15/08/17 EXTREME BUG DO NOT DELETE THIS FUNCTION BREAKS PROGRAM IDK WHY ¯\_(ツ)_/¯
|
||||
// TODO: 15/08/17 This method is implicitly called from the XML generator for boats DO NOT DELETE
|
||||
public String getHullID() {
|
||||
System.out.println("HullId");
|
||||
if (hullID == null) {
|
||||
return "";
|
||||
}
|
||||
return hullID;
|
||||
}
|
||||
|
||||
// TODO: 15/08/17 EXTREME BUG DO NOT DELETE THIS FUNCTION BREAKS PROGRAM IDK WHY ¯\_(ツ)_/¯
|
||||
// TODO: 15/08/17 This method is implicitly called from the XML generator for boats DO NOT DELETE
|
||||
public String getShortName() {
|
||||
System.out.println("shortName");
|
||||
return shortName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user