* Fixed a bug that if opponent left tournament during a match, get got points for that mathc if he won more games (fixes #1310).

This commit is contained in:
LevelX2 2015-10-11 11:19:19 +02:00
parent f4b667650c
commit 673cd6b38a

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game.tournament;
import java.util.ArrayList;
@ -276,9 +275,9 @@ public abstract class TournamentImpl implements Tournament {
tp2.setResults(addRoundResult(round.getRoundNumber(), pair, tp2, tp1));
// Add points
if (mp2.hasQuit() || mp1.getWins() > mp2.getWins()) {
if ((!mp1.hasQuit() && mp1.getWins() > mp2.getWins()) || mp2.hasQuit()) {
tp1.setPoints(tp1.getPoints() + 3);
} else if (mp1.hasQuit() || mp1.getWins() < mp2.getWins()) {
} else if ((!mp2.hasQuit() && mp1.getWins() < mp2.getWins()) || mp1.hasQuit()) {
tp2.setPoints(tp2.getPoints() + 3);
} else {
tp1.setPoints(tp1.getPoints() + 1);
@ -372,7 +371,6 @@ public abstract class TournamentImpl implements Tournament {
}
// add autosubmit trigger
synchronized (this) {
while (!isDoneConstructing()) {
try {
@ -509,7 +507,6 @@ public abstract class TournamentImpl implements Tournament {
this.startTime = new Date();
}
@Override
public void setStepStartTime(Date stepStartTime) {
this.stepStartTime = stepStartTime;