From 744147fd94febd7dae0c14f132f2dec363252a6f Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Wed, 1 Aug 2018 07:28:48 -0700 Subject: [PATCH] Flush prompt in animals example. --- example/animals.wren | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/animals.wren b/example/animals.wren index 8d2da49a..4687f88d 100644 --- a/example/animals.wren +++ b/example/animals.wren @@ -1,4 +1,4 @@ -import "io" for Stdin +import "io" for Stdin, Stdout // Implements the classic "Animals" guessing game. The user thinks of an animal. // The program asks a series of yes/no questions to try to guess the animal @@ -27,6 +27,7 @@ class Node { // Writes a prompt and reads a string of input. promptString(prompt) { System.write("%(prompt) ") + Stdout.flush() return Stdin.readLine() } }