forked from External/mage
server, refactor: added client side info about current table and parent table (tourney's sub-tables with matches);
This commit is contained in:
parent
bd7aaa34ee
commit
7916af0e52
21 changed files with 315 additions and 161 deletions
|
|
@ -25,6 +25,7 @@ public abstract class DraftImpl implements Draft {
|
|||
protected static final Logger logger = Logger.getLogger(DraftImpl.class);
|
||||
|
||||
protected final UUID id;
|
||||
protected UUID tableId = null;
|
||||
protected final Map<UUID, DraftPlayer> players = new LinkedHashMap<>();
|
||||
protected final PlayerList table = new PlayerList();
|
||||
protected int numberBoosters;
|
||||
|
|
@ -47,7 +48,7 @@ public abstract class DraftImpl implements Draft {
|
|||
protected ScheduledExecutorService boosterLoadingExecutor = null;
|
||||
|
||||
public DraftImpl(DraftOptions options, List<ExpansionSet> sets) {
|
||||
id = UUID.randomUUID();
|
||||
this.id = UUID.randomUUID();
|
||||
this.setCodes = options.getSetCodes();
|
||||
this.draftCube = options.getDraftCube();
|
||||
this.timing = options.getTiming();
|
||||
|
|
@ -60,6 +61,16 @@ public abstract class DraftImpl implements Draft {
|
|||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getTableId() {
|
||||
return tableId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTableId(UUID tableId) {
|
||||
this.tableId = tableId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPlayer(Player player) {
|
||||
DraftPlayer draftPlayer = new DraftPlayer(player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue