tournament: add: TOURNAMENT CAN START

This commit is contained in:
2023-12-26 18:24:23 +01:00
parent 44fa122585
commit 9bb6a32c70
6 changed files with 110 additions and 41 deletions

View File

@ -51,6 +51,7 @@ class Tourmanent
this.finished = response_data.finished;
this.levels = response_data.levels;
this.id = response_data.id
this.state = this.get_state();
}
leave(event)
@ -66,10 +67,7 @@ class Tourmanent
{
if (!this.connected)
return
console.log(this.isParticipating);
this.isParticipating = !this.isParticipating;
console.log(this.isParticipating);
this._socket.send(JSON.stringify({participate: this.isParticipating}));
this._socket.send(JSON.stringify({participate: ""}));
}
async join(receive_func, disconnect_func)