Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Player id
Browse files Browse the repository at this point in the history
  • Loading branch information
sorensen committed Dec 17, 2011
1 parent 2c91428 commit 401ba93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server.js
Expand Up @@ -18,17 +18,18 @@ var players = {},
losers = []

var count = 0;
var playerId = 0;

var gameStarted = false;

io.sockets.on('connection', function (socket) {


playerId += 1;
count += 1;

players[socket.id] = {
words: {},
name: 'Player' + count
name: 'Player' + playerId
}


Expand Down

0 comments on commit 401ba93

Please sign in to comment.