mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
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:
parent
df9c200753
commit
40c25fae34
25 changed files with 274 additions and 140 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue