Better logging for games, tweak width of mobile game header

This commit is contained in:
Alec Maier
2019-09-07 02:20:48 -04:00
parent f823377c2d
commit e70bcc8ba9
3 changed files with 2 additions and 2 deletions

View File

@@ -97,6 +97,7 @@ io.on('connection', function(socket) {
const game = activeGames[Object.keys(activeGames).find((key) => key === playerInfo.code)];
if (game && game.players.length < game.size) {
activeGames[Object.keys(activeGames).find((key) => key === playerInfo.code)].players.push({name: playerInfo.name, id: playerInfo.id});
console.log(playerInfo.name + " joined the game!");
socket.emit('success');
} else {
if (game && game.players.length === game.size) {