Boat Names Change. Colors Change too. Updates clients during lobby when a change is made.

tags: #story[1142]
This commit is contained in:
Alistair McIntyre
2017-08-16 19:31:27 +12:00
parent 6d045e9976
commit 02a7b804c1
9 changed files with 67 additions and 15 deletions
@@ -3,6 +3,7 @@ package seng302.model;
import java.util.HashMap;
import java.util.Observable;
import java.util.Observer;
import javafx.scene.paint.Color;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import seng302.gameServer.GameState;
@@ -30,6 +31,8 @@ public class ServerYacht extends Observable {
private String country;
private BoatStatus boatStatus;
private Color boatColor;
//Location
private Double lastHeading;
@@ -65,6 +68,7 @@ public class ServerYacht extends Observable {
this.heading = 120.0; //In degrees
this.currentVelocity = 0d; //in mms-1
this.currentMarkSeqID = 0;
this.boatColor = Color.rgb(0, 0, 0);
this.hasEnteredRoundingZone = false;
this.hasPassedLine = false;
@@ -385,5 +389,12 @@ public class ServerYacht extends Observable {
return hasPassedLine;
}
public void setBoatColor(Color color) {
this.boatColor = color;
}
public Color getBoatColor() {
return boatColor;
}
}