mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Minor fixes for merge
#story[1124] #pair[wmu16, hyi25]
This commit is contained in:
@@ -32,8 +32,6 @@ public class Yacht {
|
|||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(Yacht.class);
|
private Logger logger = LoggerFactory.getLogger(Yacht.class);
|
||||||
|
|
||||||
|
|
||||||
private static final Integer SPEED_MULTIPLIER = 4;
|
|
||||||
private static final Double ROUNDING_DISTANCE = 50d; // TODO: 3/08/17 wmu16 - Look into this value further
|
private static final Double ROUNDING_DISTANCE = 50d; // TODO: 3/08/17 wmu16 - Look into this value further
|
||||||
|
|
||||||
|
|
||||||
@@ -106,7 +104,7 @@ public class Yacht {
|
|||||||
Double windSpeedKnots = GameState.getWindSpeedKnots();
|
Double windSpeedKnots = GameState.getWindSpeedKnots();
|
||||||
Double trueWindAngle = Math.abs(GameState.getWindDirection() - heading);
|
Double trueWindAngle = Math.abs(GameState.getWindDirection() - heading);
|
||||||
Double boatSpeedInKnots = PolarTable.getBoatSpeed(windSpeedKnots, trueWindAngle);
|
Double boatSpeedInKnots = PolarTable.getBoatSpeed(windSpeedKnots, trueWindAngle);
|
||||||
Double maxBoatSpeed = boatSpeedInKnots / 1.943844492 * 1000 * SPEED_MULTIPLIER;
|
Double maxBoatSpeed = boatSpeedInKnots / 1.943844492 * 1000;
|
||||||
if (sailIn && velocity <= maxBoatSpeed && maxBoatSpeed != 0d) {
|
if (sailIn && velocity <= maxBoatSpeed && maxBoatSpeed != 0d) {
|
||||||
|
|
||||||
if (velocity < maxBoatSpeed) {
|
if (velocity < maxBoatSpeed) {
|
||||||
@@ -295,7 +293,7 @@ public class Yacht {
|
|||||||
currentMarkSeqID++;
|
currentMarkSeqID++;
|
||||||
finishedRace = true;
|
finishedRace = true;
|
||||||
logMarkRounding(currentMark);
|
logMarkRounding(currentMark);
|
||||||
System.out.println("YAY YOU FINISHED!");
|
logger.debug(sourceId + " finished");
|
||||||
// TODO: 8/08/17 wmu16 - Do something!
|
// TODO: 8/08/17 wmu16 - Do something!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -588,10 +586,13 @@ public class Yacht {
|
|||||||
if (currentMark.isGate()) {
|
if (currentMark.isGate()) {
|
||||||
typeString = "gate";
|
typeString = "gate";
|
||||||
}
|
}
|
||||||
System.out.println(
|
logger.debug(
|
||||||
"(" + currentMarkSeqID + ") Passed " + typeString + ": " + currentMark.getMarks().get(0)
|
String.format("BoatID %d passed %s %s with id %d. Now on leg %d",
|
||||||
.getName()
|
sourceId,
|
||||||
+ " ID(" + currentMark.getId() + ")");
|
typeString,
|
||||||
|
currentMark.getMarks().get(0).getName(),
|
||||||
|
currentMark.getId(),
|
||||||
|
currentMarkSeqID));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addLocationListener (YachtLocationListener listener) {
|
public void addLocationListener (YachtLocationListener listener) {
|
||||||
|
|||||||
Reference in New Issue
Block a user