small changes
This commit is contained in:
@@ -46,7 +46,7 @@ class WormTest {
|
||||
double angle = r.nextDouble() * 4 * Math.PI - 2 * Math.PI;
|
||||
double oldAngle = worm.getOrientation();
|
||||
|
||||
if (0 > oldAngle + angle || 2 * Math.PI <= oldAngle + angle || worm.getActionPoints() - (long) Math.ceil(Math.toDegrees(angle) / 6) < 0) {
|
||||
if (!Worm.isValidOrientation(oldAngle + angle) || worm.getActionPoints() - (long) Math.ceil(Math.toDegrees(angle) / 6) < 0) {
|
||||
assertThrows(AssertionError.class, () -> worm.turn(angle));
|
||||
worm = new Worm(Tuple.create(0.0, 0.0), 0, "Test", 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user