Spectating games.

This commit is contained in:
marcins78@gmail.com
2011-09-19 12:14:31 +00:00
parent b400deb59e
commit fbc7acce86
2 changed files with 12 additions and 2 deletions

View File

@@ -167,6 +167,17 @@ var GempLotrHallUI = Class.extend({
});
tableDiv.append(but);
}
if (status == "Playing") {
var but = $("<button>Watch game</button>");
$(but).button().click(
function(event) {
var participantId = getUrlParam("participantId");
var participantIdAppend = "";
if (participantId != null)
participantIdAppend = "&participantId=" + participantId;
location.href = "/gemp-lotr/game.html?gameId=" + id + participantIdAppend;
});
}
}
return tableDiv;

View File

@@ -7,7 +7,6 @@ Next priority:
26. The game area should display chat from the start.
25. Remove all non-essencial alerts, instead add warnings to chat panel.
13. Add dead/discard pile displays.
16. Add an option to watch an ongoing game (spectator).
24. The events that are played and cards affected should be shown to the players briefly using animations to make it
aestheticly pleasing.
30. Watching game replay after it's finished and sharing the game replay with others via code.
@@ -48,4 +47,4 @@ with Filters.sameCard(...) filter.
33. When a player stops responding during preparation time of the game, the game is not properly finished.
19. Add filtering cards to deck-builder.
14. Add hand/deck card count displays.
16. Add an option to watch an ongoing game (spectator).