home · contact · privacy
Allow space char for TASK:WRITE.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 27 Oct 2020 01:08:01 +0000 (02:08 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 27 Oct 2020 01:08:01 +0000 (02:08 +0100)
new2/plomrogue/game.py
new2/rogue_chat_nocanvas_monochrome.html

index 52e0d600e37b2f90fcc3209d704c2d0866f330e2..8fb264447d5c2e30f757d2d507c9e62e5a3ee84d 100755 (executable)
@@ -71,7 +71,7 @@ class Game(GameBase):
             return self.map_geometry.get_directions()
         if string_option_type == 'char':
             return [c for c in
-                    string.digits + string.ascii_letters + string.punctuation]
+                    string.digits + string.ascii_letters + string.punctuation + ' ']
         return None
 
     def send_gamestate(self, connection_id=None):
index fee0aa9aeee52267f9cd38cec06dbb2e747c16a5..b49aac424e83234740820416992600fd497be863 100644 (file)
@@ -327,7 +327,7 @@ document.addEventListener('keydown', (event) => {
           };
     } else if (mode == 'edit') {
         if (event.key.length === 1) {
-            websocket.send("TASK:WRITE " + event.key);
+            websocket.send("TASK:WRITE " + quote(event.key));
         }
         mode = 'game';
     }