Fixed WindCommand not updating downwind command when moving upwind.
#story[1096]
This commit is contained in:
@@ -47,12 +47,12 @@ public class WindCommandTest {
|
||||
@Test
|
||||
public void upwindCommandDecreasesAngle() {
|
||||
upwind.execute();
|
||||
assertEquals(initial - boat.getBearing().degrees(), offset, 1e-5);
|
||||
assertEquals(initial - boat.getBearing().degrees(), -offset, 1e-5);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downwindCommandIncreasesAngle() {
|
||||
downwind.execute();
|
||||
assertEquals(boat.getBearing().degrees() - initial, offset, 1e-5);
|
||||
assertEquals(initial - boat.getBearing().degrees(), offset, 1e-5);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user