CLEA
SET TALK OFF
ERAS
STOR 0 TO COUNT
STOR T TO TRUE
STOR 0 TO HIT
USE KIDWORDS
SET DELE OFF
GO BOTT
STOR #+1 TO MRECORD
STOR STR(MRECORD,5)TO TEMPREC
STOR TEMPREC TO MRECORD
GO TOP
?"WHERE WOULD YOU LIKE TO START?  PLEASE ENTER ANY NUMBER LESS THAN: ",MRECORD,"."
?
?"BE SURE TO USE ONLY CAPITAL LETTERS IN YOUR ANSWERS."
?
ACCE"NUMBER? "TO STARTNUM
ERAS
GOTO &STARTNUM
DO WHIL TRUE
DO WHIL.NOT.EOF
RECA
STOR TRIM(!(WORD))TO MWORD1
@ 5,0 SAY"HERE IS THE DEFINITION.  PLEASE ENTER THE WORD."
?
IF DEFINE1>" "
? TRIM(DEFINE1)
ENDI
IF DEFINE2>" "
? TRIM(DEFINE2)
ENDI
?
ACCE"WORD? "TO MWORD
STOR 0 TO HIT
STOR LEN(TRIM(MWORD))TO X
DO WHIL X>0
IF @($(MWORD,X,1),MWORD1)>0
STOR HIT+1 TO HIT
ENDI
STOR X-1 TO X
ENDD
DO CASE
CASE MWORD="?".OR.(!(MWORD)="H".AND.LEN(MWORD)=1)
ERAS
@ 5,0 SAY"I'LL BE GLAD TO HELP."
?
?"THE DEFINITION WAS:"
?
? DEFINE1
? DEFINE2
?
?"THE WORD WAS: ",MWORD1
@ 24,0 SAY"PRESS ANY KEY TO CONTINUE."
SET CONS OFF
WAIT
SET CONS ON
ERAS
STOR 0 TO COUNT
SKIP
LOOP
CASE MWORD=MWORD1
ERAS
@ 5,0 SAY"EXACTLY RIGHT!  THE WORD WAS: "+MWORD1
DO WHIL COUNT<35
STOR COUNT+1 TO COUNT
ENDD
RELE X
RELE HIT
STOR 0 TO COUNT
DELE
ERAS
SKIP
LOOP
CASE LEN(MWORD)>=(LEN(MWORD1)*.7).AND.LEN(MWORD)<=(LEN(MWORD1)*1.4).AND.;
HIT>.8*LEN(TRIM(MWORD1))
ERAS
RELE X
RELE HIT
@ 5,0 SAY"YOU WERE CLOSE ENOUGH.  THE WORD WAS: "+MWORD1
@ 7,0 SAY"YOUR WORD (PERHAPS MISSPELLED) WAS:   "+MWORD
?
?"PLEASE NOTE ANY ERRORS AND PRESS ANY KEY TO CONTINUE"
SET CONS OFF
WAIT
SET CONS ON
STOR 0 TO COUNT
DELE
ERAS
SKIP
LOOP
OTHE
ERAS
@ 5,0 SAY"I'M SORRY.  THAT IS INCORRECT.  TRY AGAIN!"
STOR 0 TO COUNT
DO WHIL COUNT<35
STOR COUNT+1 TO COUNT
ENDD
STOR 0 TO COUNT
ERAS
?"YOU TRIED: "+MWORD
LOOP
ENDC
ENDD
ERAS
@ 5,0 SAY"THAT COMPLETES THE ENTIRE WORD LIST."
@ 7,0 SAY"VERY GOOD!"
@ 12,0 SAY"WOULD YOU LIKE TO RETRY THE WORDS THAT YOU MISSED?"
?
?"(Y OR N)?"
SET CONS OFF
WAIT TO RETRY
SET CONS ON
IF RETRY ='Y'
ERAS
GO TOP
SET DELE ON
ENDI
IF RETRY ='N'
STOR F TO TRUE
SET DELETE OFF
ENDI
ENDD
CLEA
ERAS
RETU

IF RETRY ='Y'
ERAS
GO TOP
SET DELE ON
ENDI
IF RETR