Skip to content

Commit

Permalink
added emit room on score result
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Walter committed Aug 14, 2021
1 parent b6c5d38 commit e637daf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/game/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ export class Game {
if (this.stateMachine.allAnswered()) {
this.stateMachine.reset();
this.emitScore();
this.emitRoom();
}
}

public tick(): void {
if (this.stateMachine.isExpired()) {
this.stateMachine.reset();
this.emitScore();
this.emitRoom();
}
}

Expand Down

0 comments on commit e637daf

Please sign in to comment.