Merge branch 'develop' into Story64_SailsAnimations

# Conflicts:
#	src/main/java/seng302/visualiser/GameClient.java
This commit is contained in:
Kusal Ekanayake
2017-08-14 13:32:57 +12:00
24 changed files with 383 additions and 336 deletions
@@ -71,8 +71,6 @@ public final class PolarTable {
} catch (IOException e) {
System.out.println("[PolarTable] IO exception");
}
}
@@ -155,7 +153,6 @@ public final class PolarTable {
public static Double getClosestWindSpeedInPolar(Double thisWindSpeed) {
Double smallestDif = Double.POSITIVE_INFINITY;
Double closestWind = 0d;
for (Double polarWindSpeed : polarTable.keySet()) {
Double difference = Math.abs(polarWindSpeed - thisWindSpeed);
if (difference < smallestDif) {
+3 -3
View File
@@ -53,7 +53,7 @@ public class Yacht {
private Integer legNumber = 0;
//SERVER SIDE
private final Double TURN_STEP = 5.0;
public static final Double TURN_STEP = 5.0; //This should be in some utils class somewhere 2bh. Public for tests sake.
private Double lastHeading;
private Boolean sailIn = false;
private GeoPoint location;
@@ -452,9 +452,9 @@ public class Yacht {
private void turnTowardsHeading(Double newHeading) {
Double newVal = heading - newHeading;
if (Math.floorMod(newVal.longValue(), 360L) > 180) {
adjustHeading(TURN_STEP);
adjustHeading(TURN_STEP / 5);
} else {
adjustHeading(-TURN_STEP);
adjustHeading(-TURN_STEP / 5);
}
}