Fixed a bug that falsely ended players tournaments.

This commit is contained in:
LevelX2 2017-08-19 07:46:47 +02:00
parent 881822d404
commit a439f30c21

View file

@ -168,13 +168,8 @@ public abstract class MatchImpl implements Match {
MatchPlayer matchWinner = null;
for (MatchPlayer matchPlayer : players) {
if (!matchPlayer.hasQuit()) {
if (matchPlayer.getDeck() == null) {
logger.error("MatchPlayer's deck was null - matchId " + this.getId() + " - " + matchPlayer.getName());
matchPlayer.setQuit(true);
} else {
activePlayers++;
matchWinner = matchPlayer;
}
activePlayers++;
matchWinner = matchPlayer;
}
if (matchPlayer.getWins() >= options.getWinsNeeded()) {
matchPlayer.setMatchWinner(true);