From 0b74acadff0488e2f61359a55567031851c09f3a Mon Sep 17 00:00:00 2001 From: hba56 Date: Fri, 4 Aug 2017 22:19:07 +1200 Subject: [PATCH] rounding checks are now done by port or starboard side depending on what the compound marks type is #story[1101] --- racevisionGame/src/main/java/mock/model/MockRace.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/racevisionGame/src/main/java/mock/model/MockRace.java b/racevisionGame/src/main/java/mock/model/MockRace.java index 448344a6..25997ebd 100644 --- a/racevisionGame/src/main/java/mock/model/MockRace.java +++ b/racevisionGame/src/main/java/mock/model/MockRace.java @@ -837,7 +837,7 @@ public class MockRace extends Race { * @param boat The boat to check. * @param timeElapsed The total time, in milliseconds, that has elapsed since the race started. */ - protected void checkPosition(MockBoat boat, long timeElapsed) {//TODO cater for gates and rounding that aren't port side + protected void checkPosition(MockBoat boat, long timeElapsed) {//TODO cater for gates (SP or PS in the switch) //The distance, in nautical miles, within which the boat needs to get in order to consider that it has reached the marker. double epsilonNauticalMiles = 250.0 / Constants.NMToMetersConversion; //250 meters. @@ -861,7 +861,7 @@ public class MockRace extends Race { List roundingChecks = new ArrayList(Arrays.asList(roundCheck1, roundCheck2)); - switch (boat.getCurrentLeg().getEndCompoundMark().getRoundingType()) { + switch (boat.getCurrentLeg().getEndCompoundMark().getRoundingType()) {//todo may need to implement SP and PS case SP://Not yet implemented so these gates will be rounded port side case Port: boatRoundingCheckPort(boat, roundingChecks);