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

@ -309,6 +309,10 @@ public class GameController implements GameCallback {
}
public void watch(UUID userId) {
if (userPlayerMap.get(userId) != null) {
// You can't watch a game if you already a player in it
return;
}
User user = UserManager.getInstance().getUser(userId);
if (user != null) {
GameWatcher gameWatcher = new GameWatcher(userId, game);