forked from External/mage
reconnect to drafts and tournaments
This commit is contained in:
parent
bf2f4e3078
commit
7f312ed453
8 changed files with 132 additions and 42 deletions
|
|
@ -347,7 +347,9 @@ public class TableController {
|
|||
private void sideboard(UUID playerId, Deck deck, int timeout) throws MageException {
|
||||
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) {
|
||||
if (entry.getValue().equals(playerId)) {
|
||||
UserManager.getInstance().getUser(entry.getKey()).sideboard(deck, table.getId(), timeout);
|
||||
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||
if (user != null)
|
||||
user.sideboard(deck, table.getId(), timeout);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -384,6 +386,10 @@ public class TableController {
|
|||
tournament.nextStep();
|
||||
}
|
||||
|
||||
public void endTournament(Tournament tournament) {
|
||||
//TODO: implement this
|
||||
}
|
||||
|
||||
public void swapSeats(int seatNum1, int seatNum2) {
|
||||
if (table.getState() == TableState.STARTING) {
|
||||
if (seatNum1 >= 0 && seatNum2 >= 0 && seatNum1 < table.getSeats().length && seatNum2 < table.getSeats().length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue