forked from External/mage
Fixed (probably) the player1 concedes but other player2 wins. Fixed that if player runs out of timer time or player lose of beeing idle, the match will end correctly.
This commit is contained in:
parent
6d039e4262
commit
473c9e207b
32 changed files with 286 additions and 132 deletions
|
|
@ -1,11 +1,10 @@
|
|||
package mage.utils.timer;
|
||||
|
||||
import mage.MageException;
|
||||
import mage.interfaces.Action;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import mage.MageException;
|
||||
import mage.interfaces.Action;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
|
@ -14,14 +13,11 @@ public class PriorityTimer extends TimerTask {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(PriorityTimer.class);
|
||||
|
||||
private final long delay;
|
||||
private final Action taskOnTimeout;
|
||||
|
||||
private int count;
|
||||
|
||||
private long delay;
|
||||
|
||||
private Action taskOnTimeout;
|
||||
|
||||
private Action taskOnTick;
|
||||
|
||||
private States state = States.NONE;
|
||||
|
||||
enum States {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue