Started adding functionality to calculate yacht velocity from the wind speed and direction using polar tables. Also began writing tests to cover this functionality, as it can't currently be tested within the game itself.

#story[986]
This commit is contained in:
Alistair McIntyre
2017-07-20 14:30:13 +12:00
parent e317de7562
commit da7a34fc55
4 changed files with 80 additions and 9 deletions
@@ -1,11 +1,9 @@
package seng302.gameServer;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import seng302.models.Player;
import java.util.ArrayList;
import seng302.models.Yacht;
/**
@@ -65,6 +63,14 @@ public class GameState {
GameState.currentStage = currentStage;
}
public static Double getWindDirection() {
return windDirection;
}
public static Double getWindSpeed() {
return windSpeed;
}
public static void update() {
Long timeInterval = System.currentTimeMillis() - previousUpdateTime;