Boat should move towards optimal angle upwind and downwind when pressing spacebar (VMG)

#story[988]
This commit is contained in:
Alistair McIntyre
2017-07-26 20:12:57 +12:00
parent 72a45f5984
commit 7db716f51c
4 changed files with 47 additions and 17 deletions
@@ -1,10 +1,11 @@
package seng302.gameServer;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import seng302.client.ClientPacketParser;
import seng302.models.Player;
import seng302.models.Yacht;
import seng302.server.messages.BoatActionType;
@@ -27,7 +28,7 @@ public class GameState implements Runnable {
private static GameStages currentStage;
public GameState(String hostIpAddress) {
windDirection = 170d;
windDirection = 180d;
windSpeed = 10000d;
yachts = new HashMap<>();
players = new ArrayList<>();
@@ -105,7 +106,6 @@ public class GameState implements Runnable {
case VMG:
playerYacht.turnToVMG();
// System.out.println("Snapping to VMG");
// TODO: 22/07/17 wmu16 - Add in the vmg calculation code here
break;
case SAILS_IN:
playerYacht.toggleSailIn();