forked from External/mage
more draft stuff
This commit is contained in:
parent
5774a886fe
commit
c67122b605
27 changed files with 1255 additions and 6 deletions
|
|
@ -37,6 +37,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;
|
||||
import mage.view.TableView;
|
||||
|
|
@ -76,6 +77,22 @@ public class GamesRoomImpl extends RoomImpl implements GamesRoom, Serializable {
|
|||
return new TableView(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean joinDraftTable(UUID sessionId, UUID tableId, String name) throws GameException {
|
||||
if (tables.containsKey(tableId)) {
|
||||
return TableManager.getInstance().joinDraft(sessionId, tableId, name);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableView createDraftTable(UUID sessionId, DraftOptions options) {
|
||||
Table table = TableManager.getInstance().createDraftTable(sessionId, options);
|
||||
tables.put(table.getId(), table);
|
||||
return new TableView(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableView getTable(UUID tableId) {
|
||||
return new TableView(tables.get(tableId));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue