about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-02 14:55:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-02 14:55:02 -0800
commit98e6a5922dd308f0d7cf302ee0c0b5bc3a8f5a2b (patch)
treeb209df9964b483ee1f07483b491de4a2753aab83
parentb5794d2ff346694acb0b9c3fa0130c4d9db645f0 (diff)
downloadmu-98e6a5922dd308f0d7cf302ee0c0b5bc3a8f5a2b.tar.gz
488
-rw-r--r--chessboard-rawterm.mu8
1 files changed, 7 insertions, 1 deletions
diff --git a/chessboard-rawterm.mu b/chessboard-rawterm.mu
index f4fef5e1..4cea6c8b 100644
--- a/chessboard-rawterm.mu
+++ b/chessboard-rawterm.mu
@@ -94,6 +94,11 @@
   ; get from-file
   (c:character <- wait-for-key)
   (print-primitive c:character)
+  { begin
+    (quit:boolean <- equal c:character ((#\q literal)))
+    (break-unless quit:boolean)
+    (reply)
+  }
   (from-file:integer <- character-to-integer c:character)
   (from-file:integer <- subtract from-file:integer file-base:integer)
   ; assert('a' <= from-file <= 'h')
@@ -183,10 +188,11 @@
     (cursor-to-next-line)
     (print-primitive (("Type in your move as <from square>-<to square>. For example: a2-a4. Lowercase only. Currently very unforgiving of typos." literal)))
     (cursor-to-next-line)
-    (print-primitive (("Hit ctrl-c to exit, and then use the 'reset' command to clean up your terminal :/" literal)))
+    (print-primitive (("Hit 'q' to exit." literal)))
     (cursor-to-next-line)
     (print-primitive (("move: " literal)))
     (m:move-address <- read-move)
+    (break-unless m:move-address)
     (b:board-address <- make-move b:board-address m:move-address)
     (loop)
   }