 onDisconnect = ->
   delete players[this.id]
   util.log "Player #{this.id} has disconnected"
+  socket.sockets.emit 'removePlayer', { id: this.id }
 
 # Listen for connection events
 socket.sockets.on 'connection', onConnection

    if bullet.position.x < 0 || bullet.position.x > WIDTH then bullets.splice i, 1
    if bullet.position.y < 0 || bullet.position.y > HEIGHT then bullets.splice i, 1

    # TODO: bullet collision

  # Send to all connections
  socket.sockets.emit 'data', { players: players, bullets: bullets }

WIDTH = 1000
HEIGHT = 600
MAX_VELOCITY = 0.25
RESPAWN_TIMER = 3000

players = {}
bullets = []
