Changed the score algorithm so if all players have the same score, nobody is eliminated.

This commit is contained in:
Virizion 2015-11-17 20:04:23 -05:00
parent 2e9ac8df4d
commit 8145b127ba

View File

@ -259,6 +259,7 @@ public class SpeedBuilder extends SoloGame
{
Player lowestPlayer = null;
int lowestScore = -1;
boolean allEqual = !_buildRecreations.isEmpty();
for (RecreationData recreation : _buildRecreations.values())
{
@ -268,9 +269,14 @@ public class SpeedBuilder extends SoloGame
lowestPlayer = recreation.Player;
lowestScore = score;
}
if (score != lowestScore)
{
allEqual = false;
}
}
if (lowestPlayer != null)
if (lowestPlayer != null && !allEqual)
{
Manager.addSpectator(lowestPlayer, true);
GetTeamList().get(0).SetPlayerState(lowestPlayer, PlayerState.OUT);
@ -282,6 +288,10 @@ public class SpeedBuilder extends SoloGame
EndCheck();
}
if (allEqual)
Announce(F.main("Build", "Everyone completed the build so nobody was eliminated!"));
_reviewState++;
}