Merge branch 'develop' into 1124_broadcast_mark_rounding_message

# Conflicts:
#	src/main/java/seng302/gameServer/ServerToClientThread.java
This commit is contained in:
William Muir
2017-08-14 16:16:04 +12:00
24 changed files with 372 additions and 280 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
@@ -59,7 +59,7 @@ public class Yacht extends Observable {
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;
private GeoPoint location;
@@ -498,9 +498,9 @@ public class Yacht extends Observable {
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);
}
}