BareGit

Add a 'New Game' button with confirmation dialog.

Author: MetroWind <chris.corsair@gmail.com>
Date: Sat Jan 3 15:54:14 2026 -0800
Commit: 7a5d06c679de84af1ee46503a2f14de9d6503d5d

Changes

diff --git a/main.js b/main.js
index 8deebb3..94082c5 100644
--- a/main.js
+++ b/main.js
@@ -197,6 +197,7 @@ const App = () => {
 
             <div class="actions">
                 <button onClick=${undoLastMove} disabled=${state.history.length === 0}>Undo</button>
+                <button onClick=${() => { if (confirm("Start a new game? Current progress will be lost.")) startGame(); }}>New Game</button>
                 <button onClick=${fleeRoom} disabled=${!can_flee_check}>Run Away</button>
             </div>
         </div>