Merge branch 'virizion_speed_builder' of ssh://dev.mineplex.com:7999/min/mineplex into virizion_speed_builder

This commit is contained in:
Virizion 2016-01-23 03:42:50 -05:00
commit a359c4f8b6
2 changed files with 21 additions and 3 deletions

View File

@ -128,8 +128,19 @@ public class Parse
String name = "";
try
{
{
name = s.getLine(0);
if (s.getLine(1) != null && s.getLine(1).length() > 0)
name += " " + s.getLine(1);
if (s.getLine(2) != null && s.getLine(2).length() > 0)
name += " " + s.getLine(2);
if (s.getLine(3) != null && s.getLine(3).length() > 0)
name += " " + s.getLine(3);
System.out.println("Custom Location: " + name);
}
catch (Exception e)
{

View File

@ -823,18 +823,25 @@ public class SpeedBuilders extends SoloGame
RecreationData lowest = null;
int lowestScore = -1;
boolean allPerfectMatch = !_buildRecreations.isEmpty();
boolean allPlayersEqual = true;
for (RecreationData recreation : _buildRecreations.values())
{
int score = recreation.calculateScoreFromBuild(_currentBuild);
if (lowest != null && lowestScore != score)
{
allPlayersEqual = false;
}
if (lowest == null || lowestScore > score)
{
lowest = recreation;
lowestScore = score;
}
if (score != _currentBuild.getPerfectScore())
allPerfectMatch = false;
@ -842,7 +849,7 @@ public class SpeedBuilders extends SoloGame
_toEliminate.add(recreation);
}
if (!allPerfectMatch && lowest != null && !_toEliminate.contains(lowest))
if (!allPerfectMatch && !allPlayersEqual && lowest != null && !_toEliminate.contains(lowest))
_toEliminate.add(lowest);
_lastElimination = System.currentTimeMillis();