Worked on making a visual component to the stats. Need to implement acceleration.

#story[1274]
This commit is contained in:
Kusal Ekanayake
2017-09-22 16:45:10 +12:00
parent faeece27ff
commit b05580f018
6 changed files with 108 additions and 32 deletions
@@ -449,11 +449,10 @@ public class GameState implements Runnable {
private void updateVelocity(ServerYacht yacht) {
Double trueWindAngle = Math.abs(windDirection - yacht.getHeading());
Double boatSpeedInKnots = PolarTable.getBoatSpeed(getWindSpeedKnots(), trueWindAngle);
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots) * speedMultiplier;
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots) * speedMultiplier * yacht.getMaxSpeedMultiplier();
if (yacht.getPowerUp() != null) {
if (yacht.getPowerUp().equals(TokenType.BOOST)) {
// TODO: 11/09/17 wmu16 CHANGE THIS TO MAGIC NUMBER
// TODO 22/09/17 kre39 change this magic number to a variable
maxBoatSpeed *= 2;
}
}