mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Improved boat bounce-back calculation
- Changed boat bounce back send the boat n meters in the opposite direction. - Improved test to use the minimum of yacht and mark collision distances Tags: #story[1117]
This commit is contained in:
@@ -50,8 +50,7 @@ public class UpdateYachtTest {
|
||||
// Making sure no collision
|
||||
Double distance = GeoUtility.getDistance(yacht1.getLocation(), geoPoint2);
|
||||
|
||||
// Using mark collision distance as it will be smaller than boat collision distance
|
||||
Assert.assertTrue(distance > Yacht.MARK_COLLISION_DISTANCE);
|
||||
Assert.assertTrue(distance > Math.min(Yacht.MARK_COLLISION_DISTANCE, Yacht.YACHT_COLLISION_DISTANCE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user