From 98e6a5922dd308f0d7cf302ee0c0b5bc3a8f5a2b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 2 Jan 2015 14:55:02 -0800 Subject: 488 --- chessboard-rawterm.mu | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -. 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) } -- cgit 1.4.1-2-gfad0