mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Sample Tokens are now sent out in RaceXML correctly
Token and TokenType class created #story[1250]
This commit is contained in:
@@ -30,6 +30,7 @@ import seng302.model.mark.CompoundMark;
|
|||||||
import seng302.model.mark.Mark;
|
import seng302.model.mark.Mark;
|
||||||
import seng302.model.mark.MarkOrder;
|
import seng302.model.mark.MarkOrder;
|
||||||
import seng302.model.token.Token;
|
import seng302.model.token.Token;
|
||||||
|
import seng302.model.token.TokenType;
|
||||||
import seng302.utilities.GeoUtility;
|
import seng302.utilities.GeoUtility;
|
||||||
import seng302.utilities.XMLParser;
|
import seng302.utilities.XMLParser;
|
||||||
|
|
||||||
@@ -94,6 +95,17 @@ public class GameState implements Runnable {
|
|||||||
this.hostIpAddress = hostIpAddress;
|
this.hostIpAddress = hostIpAddress;
|
||||||
yachts = new HashMap<>();
|
yachts = new HashMap<>();
|
||||||
tokens = new ArrayList<>();
|
tokens = new ArrayList<>();
|
||||||
|
|
||||||
|
//TEMP TEST STUFF
|
||||||
|
// TODO: 29/08/17 wmu16 - Take this out!
|
||||||
|
tokens.add(new Token(TokenType.BOOST, 1233d, 11.83154));
|
||||||
|
tokens.add(new Token(TokenType.BOOST, 57.66877, 11.83382));
|
||||||
|
tokens.add(new Token(TokenType.BOOST, 57.66914, 11.83965));
|
||||||
|
tokens.add(new Token(TokenType.BOOST, 57.66684, 11.83214));
|
||||||
|
;
|
||||||
|
|
||||||
|
//TEMP TEST STUFF
|
||||||
|
|
||||||
players = new ArrayList<>();
|
players = new ArrayList<>();
|
||||||
GameState.hostIpAddress = hostIpAddress;
|
GameState.hostIpAddress = hostIpAddress;
|
||||||
customizationFlag = false;
|
customizationFlag = false;
|
||||||
@@ -140,6 +152,10 @@ public class GameState implements Runnable {
|
|||||||
return players;
|
return players;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void addToken(Token token) {
|
||||||
|
tokens.add(token);
|
||||||
|
}
|
||||||
|
|
||||||
public static List<Token> getTokens() {
|
public static List<Token> getTokens() {
|
||||||
return tokens;
|
return tokens;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<Tokens>
|
<Tokens>
|
||||||
<#list tokens as token>
|
<#list tokens as token>
|
||||||
<Token TokenType="${token.type}" TargetLat="${token.targetLat}" TargetLng="${token.targetLng}"/>
|
<Token TokenType="${token.tokenType}" TargetLat="${token.lat?c}" TargetLng="${token.lng?c}"/>
|
||||||
</#list>
|
</#list>
|
||||||
</Tokens>
|
</Tokens>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user