Added per map max player count. Handles case when map cannot fit players behind start mark. Added initial implementation for spacing out yachts.

#implement.
This commit is contained in:
Calum
2017-09-26 23:34:19 +13:00
parent e990c68d40
commit df7264cc1f
13 changed files with 259 additions and 86 deletions
@@ -20,15 +20,19 @@ public class RaceXMLTemplate {
private List<Corner> roundings;
private List<Limit> courseLimit;
private List<CompoundMark> course;
private Integer maxPlayers;
private Boolean tokensEnabled;
public RaceXMLTemplate(List<ServerYacht> yachts, List<Token> tokens, List<Corner> roundings,
List<Limit> limit, List<CompoundMark> course) {
List<Limit> limit, List<CompoundMark> course, Integer maxPlayers, Boolean tokensEnabled) {
this.yachts = yachts;
this.tokens = tokens;
this.roundings = roundings;
this.courseLimit = limit;
this.course = course;
startTime = LocalDateTime.now();
this.maxPlayers = maxPlayers;
this.tokensEnabled = tokensEnabled;
}
/**
@@ -83,4 +87,12 @@ public class RaceXMLTemplate {
public void setTokens(List<Token> tokens) {
this.tokens = tokens;
}
public String getTokensEnabled() {
return tokensEnabled.toString();
}
public String getMaxPlayers() {
return maxPlayers.toString();
}
}