Skip to content

Instantly share code, notes, and snippets.

@Pathen85
Pathen85 / example.js
Created July 10, 2018 18:59
WEB game logic example
// List with users that have set a username
let activePlayers = [];
// username of player that is currently drawing
let playerDrawing;
let word;
// This will execute everytime a new player connects
io.sockets.on('connection', function(socket) {
// username is not yet defined