import { updatePlayerDom } from "./dom.js"; export class Player { constructor(id, name) { this.name = name; this.timeout = null; this.id = id; this.ready = false; } resetTimeout() { if (this.timeout !== null) { window.clearTimeout(players[data.author].timeout); } this.timeout = window.setTimeout(() => { delete players[this.id]; updatePlayerDom(); }, TIMEOUT); } }