Updated velocity in yacht constructor so the boat can be seen properly working for test purposes

This commit is contained in:
William Muir
2017-07-24 16:47:17 +12:00
parent 526c12127f
commit 07cebb6c5b
3 changed files with 18 additions and 2 deletions
@@ -346,6 +346,7 @@ public class ServerToClientThread implements Runnable {
private void sendBoatLocationPackets(){
ArrayList<Yacht> yachts = new ArrayList<>(GameState.getYachts().values());
for (Yacht yacht: yachts){
// System.out.println("[SERVER] Lat: " + yacht.getLocation().getLat() + " Lon: " + yacht.getLocation().getLng());
BoatLocationMessage boatLocationMessage = new BoatLocationMessage(sourceId, getSeqNo(), yacht.getLocation().getLat(), yacht.getLocation().getLng(), yacht.getHeading(), (long) yacht.getVelocity());
sendMessage(boatLocationMessage);
}