Moved sendRaceStatus Message out of S2C Thread into MS Thread (minor refactor)

This commit is contained in:
William Muir
2017-08-16 11:53:29 +12:00
parent 000d562ffe
commit 76a750a764
5 changed files with 34 additions and 38 deletions
@@ -283,7 +283,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);
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots) * 3;
// TODO: 15/08/17 remove magic numbers from these equations.
if (yacht.getSailIn()) {
if (velocity < maxBoatSpeed - 500) {