Fixed some bugs in table handling. Fixed that matches were not set to finished yet, if players left match during sideboarding phase.

This commit is contained in:
LevelX2 2014-02-07 02:04:14 +01:00
parent df9c200753
commit 40c25fae34
25 changed files with 274 additions and 140 deletions

View file

@ -76,4 +76,11 @@ public interface Match {
// match times
Date getStartTime();
Date getEndTime();
/**
* Can the games of the match be replayed
*
* @return
*/
boolean isReplayAvailable();
void setReplayAvailable(boolean replayAvailable);
}

View file

@ -60,9 +60,12 @@ public abstract class MatchImpl implements Match {
protected Date startTime;
protected Date endTime;
protected boolean replayAvailable;
public MatchImpl(MatchOptions options) {
this.options = options;
startTime = new Date();
replayAvailable = false;
}
@Override
@ -316,4 +319,12 @@ public abstract class MatchImpl implements Match {
return null;
}
@Override
public boolean isReplayAvailable() {
return replayAvailable;
}
public void setReplayAvailable(boolean replayAvailable) {
this.replayAvailable = replayAvailable;
}
}

View file

@ -1,12 +1,13 @@
package mage.util.functions;
import java.io.Serializable;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
* @author noxx
*/
public abstract class ApplyToPermanent {
public abstract class ApplyToPermanent implements Serializable {
public abstract Boolean apply(Game game, Permanent permanent);
}