|
|
|
|
@ -779,6 +779,7 @@ public class MockRace extends Race {
|
|
|
|
|
//boats must pass all checks in order to round a mark
|
|
|
|
|
switch (boat.getRoundingStatus()) {
|
|
|
|
|
case 0://hasn't started rounding
|
|
|
|
|
System.out.println("round 0");
|
|
|
|
|
if (boat.isPortSide(boat.getCurrentLeg().getEndCompoundMark().getMark1()) &&
|
|
|
|
|
GPSCoordinate.intersects(boat.getCurrentLeg().getEndCompoundMark().getMark1().getPosition(),
|
|
|
|
|
roundingChecks.get(0), boat.getCurrentPosition())) {
|
|
|
|
|
@ -786,6 +787,7 @@ public class MockRace extends Race {
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 1://has been parallel to the mark
|
|
|
|
|
System.out.println("round 1");
|
|
|
|
|
if (boat.isPortSide(boat.getCurrentLeg().getEndCompoundMark().getMark1()) &&
|
|
|
|
|
GPSCoordinate.intersects(boat.getCurrentLeg().getEndCompoundMark().getMark1().getPosition(),
|
|
|
|
|
roundingChecks.get(1), boat.getCurrentPosition())) {
|
|
|
|
|
@ -793,6 +795,7 @@ public class MockRace extends Race {
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 2://has traveled 180 degrees around the mark
|
|
|
|
|
System.out.println("round 2");
|
|
|
|
|
//Move boat on to next leg.
|
|
|
|
|
boat.resetRoundingStatus();
|
|
|
|
|
Leg nextLeg = this.legs.get(boat.getCurrentLeg().getLegNumber() + 1);
|
|
|
|
|
|