From 180a782eff8a9cca39a5db10b9f5b818758d792a Mon Sep 17 00:00:00 2001 From: yukirij Date: Sun, 6 Oct 2024 18:08:02 -0700 Subject: [PATCH] Prevent undo after game completion. --- www/js/interface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/interface.js b/www/js/interface.js index cc242ef..8f678fb 100644 --- a/www/js/interface.js +++ b/www/js/interface.js @@ -398,7 +398,7 @@ const INTERFACE = { } let b_undo = document.getElementById("button-undo"); - if(GAME_DATA.turn == 0 || INTERFACE_DATA.Ui.request_undo == 1) { + if(GAME_DATA.turn == 0 || GAME_DATA.state.code != 0 || INTERFACE_DATA.Ui.request_undo == 1) { b_undo.setAttribute("disabled", ""); b_undo.removeAttribute("class"); } else {