Skip to content

Commit

Permalink
Checking for correct game state
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick Behringer committed Feb 26, 2024
1 parent 24b2dbe commit d17c927
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/src/models/MauMau.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export class MauMau {
}

end() {
if (this.room.state !== 'inGame') {
return;
}
this.room.state = 'done';
this.endTime = new Date();

Expand Down

0 comments on commit d17c927

Please sign in to comment.