Permalink
Browse files

fixed the transition to next question

  • Loading branch information...
coreyarch1234 committed Jul 1, 2017
1 parent 3c3d614 commit a1cfe95e56d32c19d270e2e9e4e0e32bdb213f37
Showing with 4 additions and 1 deletion.
  1. +1 −1 public/scripts/sockets.js
  2. +3 −0 sockets/game.js
@@ -9,7 +9,7 @@ var participants = 0;
$(function() {
$('.question').first().show().addClass('current-question');
gameCode = window.location.href.split('/')[3];
gameCode = window.location.href.split('/')[4];
socket.emit('publish:join', gameCode);
// // MARK: New (for waiting room)
View
@@ -143,6 +143,9 @@ module.exports = function(io) {
console.log("'" + data.socketId + "' has selected their answer...");
console.log("The number of participants: " + participantIds.length);
console.log("participants: " + participants[data.game.code]);
console.log("participants length: " + participantIds.length);
console.log("Awaiting " + (participants[data.game.code] - participantIds.length));
if ((participantIds.length) == participants[data.game.code]) {

0 comments on commit a1cfe95

Please sign in to comment.