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

@ -33,6 +33,7 @@ import org.apache.log4j.Logger;
import java.util.UUID;
import java.util.concurrent.Callable;
import mage.MageException;
/**
*
@ -42,9 +43,9 @@ public class GameWorker implements Callable {
private static final Logger logger = Logger.getLogger(GameWorker.class);
private GameCallback result;
private Game game;
private UUID choosingPlayerId;
private final GameCallback result;
private final Game game;
private final UUID choosingPlayerId;
public GameWorker(Game game, UUID choosingPlayerId, GameCallback result) {
this.game = game;
@ -58,7 +59,7 @@ public class GameWorker implements Callable {
game.start(choosingPlayerId);
game.fireUpdatePlayersEvent();
result.gameResult(game.getWinner());
} catch (Exception ex) {
} catch (MageException ex) {
logger.fatal("GameWorker error ", ex);
}
return null;