more draft stuff

This commit is contained in:
BetaSteward 2011-01-05 15:17:02 -05:00
parent 5774a886fe
commit c67122b605
27 changed files with 1255 additions and 6 deletions

View file

@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import mage.cards.decks.DeckCardLists;
import mage.game.GameException;
import mage.game.draft.DraftOptions;
import mage.game.match.MatchOptions;
import mage.util.Logging;
@ -61,6 +62,13 @@ public class TableManager {
return tableController.getTable();
}
public Table createDraftTable(UUID sessionId, DraftOptions options) {
TableController tableController = new TableController(sessionId, options);
controllers.put(tableController.getTable().getId(), tableController);
tables.put(tableController.getTable().getId(), tableController.getTable());
return tableController.getTable();
}
public Table getTable(UUID tableId) {
return tables.get(tableId);
}
@ -73,6 +81,10 @@ public class TableManager {
return controllers.get(tableId).joinTable(sessionId, name, deckList);
}
public boolean joinDraft(UUID sessionId, UUID tableId, String name) throws GameException {
return controllers.get(tableId).joinDraft(sessionId, name);
}
public boolean submitDeck(UUID sessionId, UUID tableId, DeckCardLists deckList) throws GameException {
return controllers.get(tableId).submitDeck(sessionId, deckList);
}
@ -106,6 +118,10 @@ public class TableManager {
controllers.get(tableId).startMatch(sessionId);
}
public void startDraft(UUID sessionId, UUID roomId, UUID tableId) {
controllers.get(tableId).startDraft(sessionId);
}
public boolean watchTable(UUID sessionId, UUID tableId) {
return controllers.get(tableId).watchTable(sessionId);
}