Allowed fractional health deductions per frame

- Fixed boundary penalty system

#story[1291]
This commit is contained in:
Connor Taylor-Brown
2017-09-20 14:18:39 +12:00
parent 50d5dd02a2
commit 7eb59cdcfc
3 changed files with 7 additions and 7 deletions
@@ -378,8 +378,8 @@ public class MockRace extends RaceState {
}
// Remove one unit of health for every frame spent outside boundary
if(!finish && checkBearingInsideCourse(boat.getBearing(), boat.getPosition())) {
boat.updateHealth(-1);
if(!finish && !GPSCoordinate.isInsideBoundary(boat.getPosition(), getBoundary())) {
boat.updateHealth(-0.1);
}
this.updateEstimatedTime(boat);
@@ -273,7 +273,7 @@ public class RaceServer {
private BoatState parseIndividualBoatState(MockBoat boat) {
return new BoatState(
boat.getSourceID(),
boat.getHealth()
(int)boat.getHealth()
);
}