mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Game state now updates based on boat position. Arrows drawn as boat travels course. Currently do not point in correct direction, also the sparkline does not work.
#bug #refactor #implement #story[1118]
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package seng302.gameServer.messages;
|
||||
|
||||
/**
|
||||
* The side the boat rounded the mark
|
||||
*/
|
||||
public enum RoundingSide {
|
||||
UNKNOWN(0, "Unknown"),
|
||||
PORT(1, "Port"),
|
||||
STARBOARD(2, "Stbd"),
|
||||
SP(3, "SP"),
|
||||
PS(4, "PS");
|
||||
|
||||
|
||||
private long code;
|
||||
private String name;
|
||||
|
||||
RoundingSide(long code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long getCode(){
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static RoundingSide getRoundingSide(String identifier) {
|
||||
RoundingSide roundingSide = UNKNOWN;
|
||||
switch (identifier) {
|
||||
case "Unknown":
|
||||
roundingSide = UNKNOWN;
|
||||
break;
|
||||
case "Port":
|
||||
roundingSide = PORT;
|
||||
break;
|
||||
case "Stbd":
|
||||
roundingSide = STARBOARD;
|
||||
break;
|
||||
case "SP":
|
||||
roundingSide = SP;
|
||||
break;
|
||||
case "PS":
|
||||
roundingSide = PS;
|
||||
break;
|
||||
}
|
||||
|
||||
return roundingSide;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user