game: fix
This commit is contained in:
@ -160,7 +160,7 @@ export class PongGame extends AGame
|
||||
else if (data.detail === "update_ball")
|
||||
this._updateBall(data);
|
||||
else if (data.detail === "goal")
|
||||
await this._receiveGoal(data);
|
||||
await this._goalHandler(data); // TODO fix: extract goal data in separate function
|
||||
else if (data.detail === "finish")
|
||||
await this._finishHandler(data);
|
||||
}
|
||||
@ -169,7 +169,7 @@ export class PongGame extends AGame
|
||||
{
|
||||
let player = this.players.find((player) => player.id === data.user_id);
|
||||
|
||||
player.from_json(data);
|
||||
player.import(data);
|
||||
}
|
||||
|
||||
_updateBall(data)
|
||||
|
Reference in New Issue
Block a user