From c77c43a1b0c2c4afe1d36475984ae5ce04f7f29e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 3 May 2014 09:27:21 +0200 Subject: [PATCH] Changed again action that is called if timer runs out. --- .../java/mage/server/game/GameController.java | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 60c9b97a07..d1127e83e9 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -28,6 +28,24 @@ package mage.server.game; +import java.io.BufferedOutputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.io.OutputStream; +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.zip.GZIPOutputStream; import mage.MageException; import mage.abilities.Ability; import mage.cards.Card; @@ -46,26 +64,25 @@ import mage.game.events.TableEvent; import mage.game.permanent.Permanent; import mage.interfaces.Action; import mage.players.Player; -import mage.server.*; +import mage.server.ChatManager; +import mage.server.Main; +import mage.server.TableManager; +import mage.server.User; +import mage.server.UserManager; import mage.server.util.ConfigSettings; import mage.server.util.Splitter; import mage.server.util.SystemUtil; import mage.server.util.ThreadExecutor; import mage.utils.timer.PriorityTimer; -import mage.view.*; +import mage.view.AbilityPickerView; +import mage.view.CardsView; +import mage.view.ChatMessage; import mage.view.ChatMessage.MessageColor; import mage.view.ChatMessage.MessageType; +import mage.view.GameView; +import mage.view.PermanentView; import org.apache.log4j.Logger; -import java.io.*; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.zip.GZIPOutputStream; - - /** * * @author BetaSteward_at_googlemail.com @@ -251,7 +268,7 @@ public class GameController implements GameCallback { Action executeOnNoTimeLeft = new Action() { @Override public void execute() throws MageException { - game.concede(initPlayerId); + game.timerTimeout(initPlayerId); logger.debug("Player has no time left to end the match: " + initPlayerId + ". Conceding."); } };