Began fixing conflicts with LobbyController

#bug
This commit is contained in:
Calum
2017-07-26 12:05:03 +12:00
parent 9c9f6e4e80
commit 8ac44d13df
6 changed files with 233 additions and 26 deletions
@@ -172,6 +172,7 @@ public class GameClient {
);
lobbyList.clear();
allBoatsMap.forEach((id, boat) -> lobbyList.add(id.toString() + boat.getBoatName()));
allBoatsMap.forEach((i, b) -> System.out.println(b.getBoatName()));
startRaceIfAllDataReceived();
break;
@@ -206,10 +207,8 @@ public class GameClient {
if (positionData.getType() == DeviceType.YACHT_TYPE) {
if (allXMLReceived() && allBoatsMap.containsKey(positionData.getDeviceId())) {
Yacht yacht = allBoatsMap.get(positionData.getDeviceId());
yacht.setVelocityProperty(positionData.getGroundSpeed());
yacht.setLat(positionData.getLat());
yacht.setLon(positionData.getLon());
yacht.setHeading(positionData.getHeading());
yacht.updateLocation(positionData.getLat(),
positionData.getLon(), positionData.getHeading(), positionData.getGroundSpeed());
}
} else if (positionData.getType() == DeviceType.MARK_TYPE) {
Mark mark = courseData.getCompoundMarks().get(positionData.getDeviceId());