forked from External/mage
changes to support multi-duel matches and sideboarding
This commit is contained in:
parent
aa5e45e69d
commit
4b26727d71
40 changed files with 536 additions and 147 deletions
|
|
@ -82,15 +82,17 @@ public class GameController implements GameCallback {
|
|||
private Game game;
|
||||
private UUID chatId;
|
||||
private UUID tableId;
|
||||
private UUID choosingPlayerId;
|
||||
private Future<?> gameFuture;
|
||||
|
||||
|
||||
public GameController(Game game, ConcurrentHashMap<UUID, UUID> sessionPlayerMap, UUID tableId) {
|
||||
public GameController(Game game, ConcurrentHashMap<UUID, UUID> sessionPlayerMap, UUID tableId, UUID choosingPlayerId) {
|
||||
gameSessionId = UUID.randomUUID();
|
||||
this.sessionPlayerMap = sessionPlayerMap;
|
||||
chatId = ChatManager.getInstance().createChatSession();
|
||||
this.game = game;
|
||||
this.tableId = tableId;
|
||||
this.choosingPlayerId = choosingPlayerId;
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
@ -186,7 +188,7 @@ public class GameController implements GameCallback {
|
|||
return;
|
||||
}
|
||||
}
|
||||
GameWorker worker = new GameWorker(game, this);
|
||||
GameWorker worker = new GameWorker(game, choosingPlayerId, this);
|
||||
gameFuture = gameExecutor.submit(worker);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue