Guess the number/With feedback (player): Difference between revisions

Add AsciiDots solution
m (→‎{{header|Quackery}}: adjusted commentary)
(Add AsciiDots solution)
Line 207:
end repeat
end run</lang>
 
=={{header|AsciiDots}}==
 
This is certainly not the fastest or smallest AsciiDots implementation of this task, but it works consistently.
 
The instructions print in order only because the ends of the lines are aligned. If they were not, they might print in a different order. The "Impossible" error message indicates that their are no remaining logical guesses. The range of 1 to 127 was chosen because it's easy to binary-search. All numbers are floating-point integers in AsciiDots, so rounding would be needed to use a range like 1 to 100.
 
<lang AsciiDots>
/.
*$"Think of a number from 1 to 127"
*$"Enter H if my guess is too high" /#67\
*-$"Enter L if my guess is too low" *--{=}:$""$"I WIN"&
\-$"Enter C if my guess is correct"\| /------~*{-}\
/23@-------------------------------/|/#72\ | !| @ |
\#64>*$_"Is it "$_#$_"? (H/L/C) "#a?**--{=}+------/\-/ |
/---/| | | |
| \------------------------------+------*~*{+}------v
| /#1{>}:$"Impossible"&|/#76\ !| @ |
|#a_$01#\ /2#\ | @ \*--{=}-/\-/ |
\-------*{/}@*-*---*-----------------------------------/
</lang>
 
=={{header|AutoHotkey}}==
Anonymous user