Bug fixes for final commit

This commit is contained in:
Zhi You Tan
2017-08-17 13:43:31 +12:00
parent 7a11b5eb77
commit 5a2a78a7d5
3 changed files with 7 additions and 6 deletions
@@ -360,7 +360,7 @@ public class GameState implements Runnable {
Double velocity = yacht.getCurrentVelocity();
Double trueWindAngle = Math.abs(windDirection - yacht.getHeading());
Double boatSpeedInKnots = PolarTable.getBoatSpeed(getWindSpeedKnots(), trueWindAngle);
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots) * 5;
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots);
// TODO: 15/08/17 remove magic numbers from these equations.
if (yacht.getSailIn()) {
if (velocity < maxBoatSpeed - 500) {