var app = require('http').createServer(handler);
var io = require('socket.io')(app);
var fs = require('fs');


app.listen(3000);

function handler (req, res) {
  fs.readFile(__dirname + '/index.html',
  function (err, data) {
    if (err) {
      res.writeHead(500);
      return res.end('Error loading index.html');
    }

    res.writeHead(200);
    res.end(data);
  });
}

var connectedUsers = [];
var connections = 0;


// io.on('connection', function (socket) {
//   socket.emit('news', { hello: 'world' });
//   socket.on('my other event', function (data) {
//     console.log(data);
//   });
//   socket.on('connected', function (data) {
//     connections++;
//     console.log(connections);
//   });
//   socket.on('disconnect', function () {
//     connections--;
//     console.log(connections);
//   });
// });

var game = require('./game')(io);







@@ -103,16 +103,70 @@
 'fs');%0A%0A
+process.on('SIGINT', function() %7B process.exit(); %7D);%0A
 %0Aapp.lis

Exit when receiving SIGINT