Fixed merge conflicts in server yacht

tags #story[1278]
This commit is contained in:
Haoming Yin
2017-09-25 11:09:14 +13:00
parent 44275aec04
commit 19db6668da
+8 -6
View File
@@ -11,12 +11,6 @@ import seng302.model.token.TokenType;
import seng302.utilities.GeoUtility;
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
import java.util.HashMap;
import java.util.Objects;
import java.util.Observable;
import java.util.Observer;
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
/**
* Yacht class for the racing boat. <p> Class created to store more variables (eg. boat statuses)
* compared to the XMLParser boat class, also done outside Boat class because some old variables are
@@ -197,6 +191,9 @@ public class ServerYacht {
public void turnUpwind() {
disableAutoPilot();
Double normalizedHeading = normalizeHeading();
if (continuouslyTurning) {
adjustHeading(turnStep);
} else {
if (normalizedHeading == 0) {
if (lastHeading < 180) {
adjustHeading(-turnStep);
@@ -215,10 +212,14 @@ public class ServerYacht {
adjustHeading(turnStep);
}
}
}
public void turnDownwind() {
disableAutoPilot();
Double normalizedHeading = normalizeHeading();
if (continuouslyTurning) {
adjustHeading(-turnStep);
} else {
if (normalizedHeading == 0) {
if (lastHeading < 180) {
adjustHeading(turnStep);
@@ -237,6 +238,7 @@ public class ServerYacht {
adjustHeading(-turnStep);
}
}
}
/**
* Takes the VMG from the polartable for upwind or downwind depending on the boats direction,