forked from External/mage
[minor] formatting
This commit is contained in:
parent
7014b28797
commit
8e3ebed11f
11 changed files with 118 additions and 77 deletions
|
|
@ -153,8 +153,9 @@ public class DraftController {
|
|||
}
|
||||
|
||||
private boolean allJoined() {
|
||||
if (!draft.allJoined())
|
||||
if (!draft.allJoined()) {
|
||||
return false;
|
||||
}
|
||||
for (DraftPlayer player: draft.getPlayers()) {
|
||||
if (player.getPlayer().isHuman() && draftSessions.get(player.getPlayer().getId()) == null) {
|
||||
return false;
|
||||
|
|
@ -206,8 +207,9 @@ public class DraftController {
|
|||
}
|
||||
|
||||
private synchronized void pickCard(UUID playerId, int timeout) throws MageException {
|
||||
if (draftSessions.containsKey(playerId))
|
||||
if (draftSessions.containsKey(playerId)) {
|
||||
draftSessions.get(playerId).pickCard(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,15 +148,17 @@ public class DraftSession {
|
|||
|
||||
public DraftPickView sendCardPick(UUID cardId) {
|
||||
cancelTimeout();
|
||||
if (draft.addPick(playerId, cardId))
|
||||
if (draft.addPick(playerId, cardId)) {
|
||||
return getDraftPickView(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void removeDraft() {
|
||||
User user = UserManager.getInstance().getUser(userId);
|
||||
if (user != null)
|
||||
if (user != null) {
|
||||
user.removeDraft(playerId);
|
||||
}
|
||||
}
|
||||
|
||||
private DraftView getDraftView() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue