Sails can be toggled on the visualiser and the rotate sails button rotates the sail visually. #story[1098]

This commit is contained in:
Joseph Gardner
2017-08-07 15:01:16 +12:00
parent 7c5670f8c2
commit f6cdf66bfe
4 changed files with 69 additions and 6 deletions
@@ -0,0 +1,33 @@
package visualiser.model;
/**
* The properties of the boat currently being controlled by the player. Singleton.
*/
public class ThisBoat {
// TODO Initialise sourceID to the sourceID given by the network
private int sourceID = 125;
private boolean sailsOut = false;
private static ThisBoat instance = new ThisBoat();
private ThisBoat(){}
public static ThisBoat getInstance(){
return instance;
}
public void setSailsOut(boolean sailsOut) {
this.sailsOut = sailsOut;
}
public void setSourceID(int sourceID) {
this.sourceID = sourceID;
}
public boolean isSailsOut() {
return sailsOut;
}
public int getSourceID() {
return sourceID;
}
}