5 public domain software, programmed by Roger MIller? AZl SOLUTION( ), G$( ), GS( ), COMP( ) P: ,,: :CLEAR the screen (((,,))) set initial values for parameters$DIGITS  : number of digits in the numbers7.DIGMAX  : maximum value for each digitc8TRIES  : number of tries allowedB "This is a guessing game called MASTERMIND."L "You won't need the ENTER key (RETURN) in this game."V "Do you know how to play? (y/n/s/?)" `A$ $(),j A$ "y" A$ "Y" Lt A$ "s" A$ "S" l~ A$ "n" A$ "N" F "y for Yes, you know how to play." "n for No, you don't know the game." "s for Set the parameters."  "? to explain y/n/s/? (this list)" VA "How many digits in the number (1-9)"PA$ $()p A$ "1" A$ "9" DIGITS (A$) ("0") "What is the range for each digit? (2-9)"A$ $() A$ "2" A$ "9"  DIGMAX (A$) ("0")7  "How many tries do you want? (01-99)"FA$ $()UB$ $()u( A$ "0" A$ "9"  2 B$ "0" B$ "9"  <TRIES ((A$)("0")) (B$)("0")F "I will think of a number with ";DIGITS;" digits."-P "Each digit will be from 1 to ";DIGMAX"."]Z "Then you get to try to guess my number."d "After each guess, I will tell you how many"n "digits are correct and how many are correct"x "and in the correct position." "You get ";TRIES;" tries to guess the number.") ,M "Press any key to continue."X ,gA$ $() now set up the number I  DIGITSSOLUTION(I) ( DIGMAX  ) IGUESS  : set for the first guess9 "Enter your guess.(";DIGITS;" digits from 1-";DIGMAX;")"w "COUNT GUESS CORRECT CORRECT, IN PLACE" get a guessGUESS GUESS  : add one valid guess GUESS," ,,,I 6 I DIGITS @ G$(I) $()3J (G$(I))  (G$(I))  |NT ();" ";();^^ I I th I  I r @| G$(I); G$(I) "1" G$(I) (DIGMAX("0"))  GS(I) (G$(I)) ("0") I I  6 " "9 "Your guess was not a proper digit."\ "Do you want to quit? (y/n)"kA$ $() A$ "y" A$ "Y" "MENU" A$ "n" A$ "N"   see how the guess compares to the solutionINPLACE  : counter for correct guessesQNUMOK  : counter for correct, not in placef I  DIGITS DEBUG  "d6310" SOLUTION(I);GS(I);INPLACE;& COMP(I) SOLUTION(I)0 COMP(I) GS(I) X: INPLACE INPLACE !D COMP(I)  : avoid double countingKN GS(I)  : avoid double countingSX Ipb INPLACE DIGITS zl " "v "Congratulations. You won in ";GUESS;" tries." "Do you want to try again? (y/n)"A$ $() A$ "y" A$ "Y" 3 A$ "n" A$ "N" "MENU" : H I  DIGITSb COMP(I)   y J  DIGITS DEBUG  " d7610 ";COMP(I); GS(J);NUMOK; COMP(I) GS(J)  NUMOK NUMOK   COMP(I)  : avoid double counting;  GS(J)  : avoid double countingG   Q  JY  I  " ",NUMOKINPLACE;" ";INPLACE  GUESS TRIES  * "Sorry, but your number of tries is up." 4 "The answer is "; > I  DIGITS !H SOLUTION(I);!R I!\ " ")!f