From 196af065fb3b232ab863303dc9d0b8acc1b062bb Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 22 Nov 2020 04:25:30 +0100
Subject: [PATCH] Minor refactor.

---
 rogue_chat_nocanvas_monochrome.html | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html
index 4ea33d6..1058663 100644
--- a/rogue_chat_nocanvas_monochrome.html
+++ b/rogue_chat_nocanvas_monochrome.html
@@ -599,16 +599,8 @@ let tui = {
     }
     document.getElementById("help").disabled = false;
     if (this.mode.name == 'play' || this.mode.name == 'study' || this.mode.name == 'control_tile_draw') {
-        document.getElementById("move_left").disabled = false;
-        document.getElementById("move_right").disabled = false;
-        if (game.map_geometry == 'Hex') {
-            document.getElementById("move_upleft").disabled = false;
-            document.getElementById("move_upright").disabled = false;
-            document.getElementById("move_downleft").disabled = false;
-            document.getElementById("move_downright").disabled = false;
-        } else {
-            document.getElementById("move_up").disabled = false;
-            document.getElementById("move_down").disabled = false;
+        for (const move_key of document.querySelectorAll('[id^="move_"]')) {
+            move_key.disabled = false;
         }
     }
     if (!this.mode.is_intro && this.mode.name != 'play') {
-- 
2.30.2