|
|
|
|
@ -61,7 +61,7 @@ public class MockRace extends RaceState {
|
|
|
|
|
*/
|
|
|
|
|
private Polars polars;
|
|
|
|
|
|
|
|
|
|
private ActiveObserverCommand activeObserverCommand;
|
|
|
|
|
private Map<Integer, ActiveObserverCommand> activeObserverCommands;
|
|
|
|
|
|
|
|
|
|
private long racePreStartTime = Constants.RacePreStartTime;
|
|
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ public class MockRace extends RaceState {
|
|
|
|
|
this.setRaceDataSource(raceDataSource);
|
|
|
|
|
this.setRegattaDataSource(regattaDataSource);
|
|
|
|
|
|
|
|
|
|
this.activeObserverCommand = new ActiveObserverCommand();
|
|
|
|
|
this.activeObserverCommands = new HashMap<>();
|
|
|
|
|
this.polars = polars;
|
|
|
|
|
this.scaleFactor = timeScale;
|
|
|
|
|
|
|
|
|
|
@ -132,6 +132,7 @@ public class MockRace extends RaceState {
|
|
|
|
|
getRaceDataSource().getParticipants().add(sourceID);
|
|
|
|
|
|
|
|
|
|
this.boats.add(mockBoat);
|
|
|
|
|
this.activeObserverCommands.put(boat.getSourceID(), new ActiveObserverCommand());
|
|
|
|
|
|
|
|
|
|
getRaceDataSource().incrementSequenceNumber();
|
|
|
|
|
|
|
|
|
|
@ -752,11 +753,11 @@ public class MockRace extends RaceState {
|
|
|
|
|
super.setChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void addVelocityCommand(ObserverCommand c) {
|
|
|
|
|
this.activeObserverCommand.changeVelocityCommand(this, c);
|
|
|
|
|
public void addVelocityCommand(ObserverCommand c, int boatId) {
|
|
|
|
|
this.activeObserverCommands.get(boatId).changeVelocityCommand(this, c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void addAngularCommand(ObserverCommand c) {
|
|
|
|
|
this.activeObserverCommand.changeAngularCommand(this, c);
|
|
|
|
|
public void addAngularCommand(ObserverCommand c, int boatId) {
|
|
|
|
|
this.activeObserverCommands.get(boatId).changeAngularCommand(this, c);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|