Having 0 hp now removes the boat from being an active boat. #story[1292]
This commit is contained in:
@@ -640,7 +640,7 @@ public class MockRace extends RaceState {
|
||||
for (MockBoat boat : this.boats) {
|
||||
|
||||
//If the boat is currently racing, count it.
|
||||
if (boat.getStatus() == BoatStatusEnum.RACING) {
|
||||
if (boat.getStatus() == BoatStatusEnum.RACING && boat.getHealth()>=1) {
|
||||
numberOfActiveBoats++;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
||||
|
||||
//As long as there is at least one boat racing, we still simulate the race.
|
||||
if (race.getNumberOfActiveBoats() != 0) {
|
||||
|
||||
//System.out.println(race.getNumberOfActiveBoats());
|
||||
//Get the time period of this frame.
|
||||
long framePeriod = currentTime - previousFrameTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user