Task

Write a game (computer program) that follows the following rules:

 The computer chooses a number between given set limits.
 The player is asked for repeated guesses until the the target number is guessed correctly
 At each guess, the computer responds with whether the guess is:
 higher than the target,
 equal to the target, 
 less than the target,   or
 the input was inappropriate. 


Related task

   Guess the number/With Feedback (Player)


The low number is 1.
 
The high number is 100.
 
To run:
Start up.
Play the guessing game.
Wait for the escape key.
Shut down.
 
To play the guessing game:
Pick a secret number between the low number and the high number.
Write "I chose a secret number between " then the low number then " and " then the high number then "." then the return byte on the console.
Loop.
Ask the user for a number.
If the number is the secret number, break.
If the number is less than the secret number, write "  Too low." on the console.
If the number is greater than the secret number, write "  Too high." on the console.
Repeat.
Write "  Well guessed!" on the console.
 
To ask the user for a number:
Write "Your guess? " to the console without advancing.
Read a string from the console.
If the string is not any integer, write "  Guess must be an integer." on the console; repeat.
Convert the string to the number.
If the number is less than the low number, write "  Guess can't be lower than " then the low number then "." on the console; repeat.
If the number is greater than the high number, write "  Guess can't be higher than " then the high number then "." on the console; repeat.