home · contact · privacy
New client: Read Q as quit signal.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 25 Sep 2015 02:17:52 +0000 (04:17 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 25 Sep 2015 02:17:52 +0000 (04:17 +0200)
client_prototype.py

index cdbe616dad24157b40594f51c7800ae2867dfcd1..f239242ec20c4180c1caa9d20b7116442ffb5e14 100644 (file)
@@ -144,7 +144,9 @@ def main(stdscr):
     set_window_geometries()
     while True:
         draw_screen()
-        stdscr.getch()
+        char = stdscr.getkey()
+        if ('Q' == char):
+            exit()
 
 def foo():
     winmap = ['.', 'o', '.', 'o', 'O', 'o', '.', 'o', '.', 'x', 'y', 'x']