From 4aebcb3f3d6ee04d8942ee9dea4a9c11e5a66434 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Mon, 23 Mar 2020 17:56:08 +0100 Subject: [PATCH] Can pause game --- script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script.js b/script.js index 03e5ce6..8279979 100644 --- a/script.js +++ b/script.js @@ -276,6 +276,9 @@ async function startGame(gameID) { document.body.addEventListener("keydown", (ev) => { if(["ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp"].includes(ev.key)) key = ev.key; + + if(ev.key == "p") + alert("Game paused. Close this dialog to resume"); }); // Automatically generate new map element if required