Fixing a silly mistake where starboard side rounding checks for a port side rounding (Thank goodness for documenting manual tests)
#story[1101]
This commit is contained in:
@@ -515,7 +515,7 @@ public class MockRace extends Race {
|
|||||||
|
|
||||||
switch (boat.getRoundingStatus()) {
|
switch (boat.getRoundingStatus()) {
|
||||||
case 0://hasn't started rounding
|
case 0://hasn't started rounding
|
||||||
if (boat.isPortSide(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing)) &&
|
if (boat.isStarboardSide(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing)) &&
|
||||||
GPSCoordinate.passesLine(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing).getPosition(),
|
GPSCoordinate.passesLine(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing).getPosition(),
|
||||||
roundingChecks.get(0), boat.getCurrentPosition(), legBearing) &&
|
roundingChecks.get(0), boat.getCurrentPosition(), legBearing) &&
|
||||||
gateCheck) {
|
gateCheck) {
|
||||||
@@ -523,7 +523,7 @@ public class MockRace extends Race {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1://has been parallel to the mark
|
case 1://has been parallel to the mark
|
||||||
if (boat.isPortSide(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing)) &&
|
if (boat.isStarboardSide(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing)) &&
|
||||||
GPSCoordinate.passesLine(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing).getPosition(),
|
GPSCoordinate.passesLine(boat.getCurrentLeg().getEndCompoundMark().getMarkForRounding(legBearing).getPosition(),
|
||||||
roundingChecks.get(1), boat.getCurrentPosition(), Bearing.fromDegrees(legBearing.degrees() + 90))) {//positive 90 from bearing because of starboard rounding
|
roundingChecks.get(1), boat.getCurrentPosition(), Bearing.fromDegrees(legBearing.degrees() + 90))) {//positive 90 from bearing because of starboard rounding
|
||||||
boat.increaseRoundingStatus();
|
boat.increaseRoundingStatus();
|
||||||
|
|||||||
Reference in New Issue
Block a user