|
|
|
@ -299,7 +299,6 @@ public class MockRace extends Race {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Calculates the distance a boat has travelled and updates its current position according to this value.
|
|
|
|
* Calculates the distance a boat has travelled and updates its current position according to this value.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -314,6 +313,8 @@ public class MockRace extends Race {
|
|
|
|
|
|
|
|
|
|
|
|
if (!finish && totalElapsedMilliseconds >= updatePeriodMilliseconds & boat.isSailsOut()) {
|
|
|
|
if (!finish && totalElapsedMilliseconds >= updatePeriodMilliseconds & boat.isSailsOut()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkPosition(boat, totalElapsedMilliseconds);
|
|
|
|
|
|
|
|
|
|
|
|
setBoatSpeed(boat);
|
|
|
|
setBoatSpeed(boat);
|
|
|
|
|
|
|
|
|
|
|
|
//Calculates the distance travelled, in meters, in the current timeslice.
|
|
|
|
//Calculates the distance travelled, in meters, in the current timeslice.
|
|
|
|
@ -515,7 +516,7 @@ public class MockRace extends Race {
|
|
|
|
if (boat.isStarboardSide(roundingMark) &&
|
|
|
|
if (boat.isStarboardSide(roundingMark) &&
|
|
|
|
GPSCoordinate.passesLine(roundingMark.getPosition(),
|
|
|
|
GPSCoordinate.passesLine(roundingMark.getPosition(),
|
|
|
|
roundingChecks.get(0), boat.getPosition(), legBearing) &&
|
|
|
|
roundingChecks.get(0), boat.getPosition(), legBearing) &&
|
|
|
|
gateCheck &&
|
|
|
|
gateCheck &&
|
|
|
|
boat.isBetweenGate(roundingMark, Mark.tempMark(roundingChecks.get(0)))) {
|
|
|
|
boat.isBetweenGate(roundingMark, Mark.tempMark(roundingChecks.get(0)))) {
|
|
|
|
boat.increaseRoundingStatus();
|
|
|
|
boat.increaseRoundingStatus();
|
|
|
|
if (boat.getCurrentLeg().getLegNumber() + 2 >= legs.size()){
|
|
|
|
if (boat.getCurrentLeg().getLegNumber() + 2 >= legs.size()){
|
|
|
|
@ -699,4 +700,4 @@ public class MockRace extends Race {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|