diff --git a/src/client/graphics/layers/OptionsMenu.ts b/src/client/graphics/layers/OptionsMenu.ts index 38c28af25..32d07727a 100644 --- a/src/client/graphics/layers/OptionsMenu.ts +++ b/src/client/graphics/layers/OptionsMenu.ts @@ -52,6 +52,12 @@ export class OptionsMenu extends LitElement implements Layer { private hasWinner = false; private onExitButtonClick() { + const isAlive = this.game.myPlayer()?.isAlive(); + if (isAlive) { + const isConfirmed = confirm("Are you sure you want to exit the game?"); + if (!isConfirmed) return; + } + window.location.reload(); }