Re-enabled source id allocator check.

Re-enabled rotation of map at startup.
Changed race.xml schema so that yacht elements aren't required inside the participants element.
#story[1185]
This commit is contained in:
fjc40
2017-09-13 00:41:23 +12:00
parent 3fa6b9200d
commit 9fa1b9ee67
6 changed files with 33 additions and 26 deletions
@@ -36,10 +36,10 @@ public class SourceIdAllocator {
*/
public synchronized int allocateSourceID() throws SourceIDAllocationException {
/*if (!((mockRace.getRaceStatusEnum() == RaceStatusEnum.PRESTART)
if (!((mockRace.getRaceStatusEnum() == RaceStatusEnum.PRESTART)
|| (mockRace.getRaceStatusEnum() == RaceStatusEnum.WARNING))) {
throw new SourceIDAllocationException("Could not allocate a source ID. Can only allocate during pre-start period. It is currently: " + mockRace.getRaceStatusEnum());
}*///TEMP DISABLED FOR TESTING - RE-ENABLE THIS
}
List<Integer> allocatedIDs = mockRace.getRaceDataSource().getParticipants();
List<Integer> allIDs = new ArrayList<>(mockRace.getBoatDataSource().getBoats().keySet());