Work on #10 - Add skipping for disconnected players.

This commit is contained in:
Gareth Latty
2015-12-18 13:40:42 +00:00
parent 3278b42fa7
commit 00108e6edf
22 changed files with 419 additions and 165 deletions
@@ -19,14 +19,18 @@ jQuery(function($) {
$('body').on('click', '.js-hide-scores', hideScores);
});
function inviteOverlay(event) {
function inviteOverlay() {
mui.overlay('on', $('#invite')[0].cloneNode(true));
}
function aboutOverlay(event) {
function aboutOverlay() {
mui.overlay('on', $('#about')[0].cloneNode(true));
}
function toggleWarningDrawer() {
$('#warning-drawer').toggleClass('shut');
}
function start(url) {
var socket = null;
var gameCode = window.location.hash.substr(1);
@@ -76,7 +80,6 @@ function start(url) {
}
game.ports.subscription.subscribe(function (lobbyIdAndSecret) {
console.log(lobbyIdAndSecret);
if (lobbyIdAndSecret != null) {
localStorage.setItem("existingGame", JSON.stringify(lobbyIdAndSecret))
openWebSocket(lobbyIdAndSecret.lobbyId, lobbyIdAndSecret.secret);