var nextId = 0; class Player { constructor(socket) { this.socket = socket; this.room = null; this.id = nextId++; } sendMessage(type, details) { this.socket.send(JSON.stringify({...details, type:type})); } addToRoom() { } removeFromRoom() { } remove() { } } module.exports = Player;