Fixed Tutorial not being able to run #story[1185]
This commit is contained in:
@@ -68,7 +68,9 @@ public class MockRace extends RaceState {
|
||||
|
||||
private ActiveObserverCommand activeObserverCommand;
|
||||
|
||||
private long racePreStartTime = Constants.RacePreStartTime;
|
||||
|
||||
private long racePreparatoryTime = Constants.RacePreparatoryTime;
|
||||
|
||||
/**
|
||||
* Constructs a race object with a given RaceDataSource, BoatDataSource, and RegattaDataSource and sends events to the given mockOutput.
|
||||
@@ -167,15 +169,15 @@ public class MockRace extends RaceState {
|
||||
long timeToStart = - this.getRaceClock().getDurationMilli();
|
||||
|
||||
|
||||
if (timeToStart > Constants.RacePreStartTime) {
|
||||
if (timeToStart > racePreStartTime) {
|
||||
//Time > 3 minutes is the prestart period.
|
||||
this.setRaceStatusEnum(RaceStatusEnum.PRESTART);
|
||||
|
||||
} else if ((timeToStart <= Constants.RacePreStartTime) && (timeToStart >= Constants.RacePreparatoryTime)) {
|
||||
} else if ((timeToStart <= racePreStartTime) && (timeToStart >= racePreparatoryTime)) {
|
||||
//Time between [1, 3] minutes is the warning period.
|
||||
this.setRaceStatusEnum(RaceStatusEnum.WARNING);
|
||||
|
||||
} else if ((timeToStart <= Constants.RacePreparatoryTime) && (timeToStart > 0)) {
|
||||
} else if ((timeToStart <= racePreparatoryTime) && (timeToStart > 0)) {
|
||||
//Time between (0, 1] minutes is the preparatory period.
|
||||
this.setRaceStatusEnum(RaceStatusEnum.PREPARATORY);
|
||||
|
||||
@@ -188,6 +190,13 @@ public class MockRace extends RaceState {
|
||||
|
||||
}
|
||||
|
||||
public void setRacePreStartTime(long racePreStartTime) {
|
||||
this.racePreStartTime = racePreStartTime;
|
||||
}
|
||||
|
||||
public void setRacePreparatoryTime(long racePreparatoryTime) {
|
||||
this.racePreparatoryTime = racePreparatoryTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status of all boats in the race to RACING.
|
||||
|
||||
Reference in New Issue
Block a user