Added possibility to show tournament panel and watch tournament games (if allowed at tournament start) for spectators .

This commit is contained in:
LevelX2 2013-07-16 17:39:02 +02:00
parent 001f8ec1e6
commit 9838dea551
24 changed files with 520 additions and 311 deletions

View file

@ -640,6 +640,17 @@ public class MageServerImpl implements MageServer {
});
}
@Override
public boolean watchTournamentTable(final String sessionId, final UUID tableId) throws MageException {
return executeWithResult("setUserData", sessionId, new ActionWithBooleanResult() {
@Override
public Boolean execute() throws MageException {
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
return TableManager.getInstance().watchTable(userId, tableId);
}
});
}
@Override
public void watchGame(final UUID gameId, final String sessionId) throws MageException {
execute("watchGame", sessionId, new Action() {