Fixing a silly mistake where starboard side rounding checks for a port side rounding (Thank goodness for documenting manual tests)

#story[1101]
main
hba56 8 years ago
parent f386a4b989
commit a05ffd023d

@ -515,7 +515,7 @@ public class MockRace extends Race {
switch (boat.getRoundingStatus()) {
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(),
roundingChecks.get(0), boat.getCurrentPosition(), legBearing) &&
gateCheck) {
@ -523,7 +523,7 @@ public class MockRace extends Race {
}
break;
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(),
roundingChecks.get(1), boat.getCurrentPosition(), Bearing.fromDegrees(legBearing.degrees() + 90))) {//positive 90 from bearing because of starboard rounding
boat.increaseRoundingStatus();

Loading…
Cancel
Save