mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
WIP: Implemented basic mark rounding algorithm.
Removed RacePosition class. Instead marks are just grabbed from the mark order class when necessary. No marks are stored as an attribute in the yacht class but the 'currentMarkSeqID' which is used to get current, and surrounding marks. Works for all marks in between but not including starting and finishing gate as no angle can be made with them. Still to work out how to implement this #story[1124]
This commit is contained in:
@@ -38,17 +38,19 @@ public class YachtTest {
|
||||
Mark subMark2 = new Mark("H", 57.670822, 11.843392, 0);
|
||||
compoundMark.addSubMarks(subMark1, subMark2);
|
||||
|
||||
yacht.setNextMark(compoundMark);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDistanceToNextMark() {
|
||||
Double actual, expected;
|
||||
actual = yacht.calcDistanceToNextMark();
|
||||
expected = 927d;
|
||||
assertEquals(expected, actual, expected * toleranceRatio);
|
||||
}
|
||||
//This will no longer work as we cant set the next mark any more as we no longer hold it in
|
||||
//yacht class as an attribute
|
||||
|
||||
// @Test
|
||||
// public void testDistanceToNextMark() {
|
||||
// Double actual, expected;
|
||||
// actual = yacht.calcDistanceToNextMark();
|
||||
// expected = 927d;
|
||||
// assertEquals(expected, actual, expected * toleranceRatio);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user