50 RANDOMIZE TIMER
100 PRINT:PRINT:PRINT:PRINT "HELLO. WHAT IS YOUR NAME";:INPUT N$
110 PRINT "HI ";N$;". THIS IS THE GAME KNOWN AS HANGMAN. DO YOU KNOW" 
120 PRINT "HOW TO PLAY ";:INPUT Y$ 
130 IF Y$="YES" THEN 210 
140 IF Y$="NO" THEN 160 
150 PRINT "JUST A YES OR NO WILL DO JUST FINE HERE. ";:INPUT Y$:GOTO130 
160 PRINT "I THINK OF A WORD, AND YOU GUESS THE LETTERS IN THE WORD."
170 PRINT "YOU HAVE 10 GUESSES. IF YOU GUESS THE CORRECT WORD, YOU" 
180 PRINT "WIN. IF NOT, YOU HANG. CORRECT LETTER GUESSES WILL NOT AFFE
190 PRINT "YOUR COUNTER. YOU MAY SURRENDER AT ANY TIME BY TYPING IN AN"
200 PRINT "ASTERISK (*). WE ARE NOW READY TO BEGIN." 
210 PRINT "THIS IS THE ADVANCED VOCABULARY GAME":PRINT 
220 DIM V(20) 
230 DIM B(20) 
240 DIM C$(20),G$(20),B$(40) 
250 DIM F(10),O$(10),Q$(20) 
260 DIM A(20),H(1),T(20)
270 DIM W$(20) 
280 PRINT "LET'S PLAY HANGMAN."
290 GOSUB 1490 
300 PRINT L$
310 W7$="IES" 
320 L7$="S."
330 H(0)=1 
340 RESTORE 
350 FOR I=1 TO 10: READ F(I):NEXT 
360 FOR I=1 TO 10: READ O$(I):NEXT 
370 READ N9 
380 LET N=0 
390 Q=0
400 N2 = 0 
410 FOR J = 1 TO 20 
420 Q$(J) = " " 
430 NEXT J 
440 I=INT(N9*RND(1)+1) 
450 FOR J=1 TO I
460 READ A$ 
470 NEXT J 
480 A=LEN(A$) 
490 FOR I=1 TO A:T(I)=ASC(MID$(A$,I,1)):NEXT
500 A5=155-T(A)
510 FOR I=1 TO A-1 
520 T(A-I+1)=155-T(A-I)
530 NEXT 
540 T(1)=A5
550 FOR I=1 TO A 
560 W$(I)=CHR$(T(I)):G$(I)=W$(I) 
570 NEXT 
580 FOR J=1 TO 20 
590 C$(J)="-" 
600 NEXT J 
610 X=10 
620 N=1
630 N1=0 
640 REM DON"T PRINT GUESSES
650 IF Q=1 THEN 710 
660 PRINT "THE WORD IS "; 
670 FOR J=1 TO A 
680 PRINT C$(J);" "; 
690 NEXT J 
700 PRINT L$ 
710 Q=0
720 PRINT "GUESS"; 
730 INPUT G1$ 
740 IF G1$="*" THEN 1300 
750 IF G1$=A$ THEN 1280
760 FOR K=1 TO A 
770 IF G1$=G$(K) THEN 930 
780 NEXT K 
790 FOR L=1 TO N 
800 IF G1$><B$(L) THEN 830
810 PRINT "NO...YOU TRIED THIS BEFORE."
820 GOTO 850 
830 NEXT L 
840 PRINT "NO" 
850 X = X - 1 
860 N2 = N2 + 1
870 Q=1
880 Q$(F(N2))=O$(N2) 
890 IF X=0 THEN 1240 
900 GOSUB 1480 
910 GOSUB 1040 
920 GOTO 1010 
930 PRINT "HEY, THAT""S RIGHT!!!!!"
940 FOR L=K TO A 
950 IF G$(L)><G1$ THEN 990
960 C$(L)=G1$ 
970 G$(L)="=,$*):" 
980 N1=N1+1
990 NEXT L 
1000 GOSUB 1040 
1010 IF N1=A THEN 1280 
1020 IF X=0 THEN 1240 
1030 GOTO 640 
1040 V=LEN(G1$) 
1050 IF V<1 THEN 1180 
1060 N = N + 1 
1070 LET B(N)=ASC(G1$)
1080 B$(N)=G1$ 
1090 FOR I=1 TO N-1 
1100 IF B(N-I+1)>=B(N-I) THEN 1170 
1110 G1$=B$(N-I)
1120 B$(N-I)=B$(N-I+1) 
1130 B$(N-I+1)=G1$ 
1140 A5=B(N-I) 
1150 B(N-I)=B(N-I+1)
1160 B(N-I+1)=A5
1170 NEXT I 
1180 PRINT "YOU HAVE USED ";
1190 FOR L=1 TO N 
1200 PRINT B$(L); 
1210 NEXT L 
1220 PRINT ". ";
1230 RETURN 
1240 PRINT "YOU HAVE BEEN HUNG!"
1250 L8=L8+1
1260 GOSUB 1480 
1270 GOTO 1300 
1280 PRINT "YOU WIN"
1290 W8=W8+1
1300 PRINT "THE WORD WAS "; 
1310 FOR J=1 TO A 
1320 PRINT W$(J); 
1330 NEXT J 
1340 REM
1350 PRINT:PRINT "DO YOU WANT TO TRY ANOTHER WORD ";N$;"."
1360 INPUT T$ 
1370 IF T$="YES" THEN 340 
1380 PRINT L$ 
1390 IF W8<>1 THEN 1410 
1400 W7$="Y"
1410 IF L8<>1 THEN 1430 
1420 L7$="."
1430 PRINT "WELL ";N$;" YOU RETIRE WITH A RECORD OF";W8;"VICTOR";W7$;" AND";
1440 PRINT L8;"DEFEAT";L7$ 
1450 IF W8>0 THEN 1460 
1460 PRINT "THANKS FOR PLAYING THE ADVANCED LEVEL OF HANGMAN." 
1470 END
1480 IF X>0 THEN 1610 
1490 PRINT "-----" 
1500 PRINT "I I" 
1510 FOR I = 1 TO 4 
1520 PRINT "I ";
1530 FOR J = 1 TO 5 
1540 PRINT Q$(5*(I-1)+J); 
1550 NEXT J 
1560 PRINT L$ 
1570 NEXT I 
1580 PRINT "I" 
1590 PRINT "--------" 
1600 RETURN 
1610 PRINT "YOU HAVE ";X;" MORE GUESSES." 
1620 RETURN 
1630 DATA 3,8,14,12,7,9,16,20,1,5 
1640 DATA "0","I","\","/","-","-","-","-","\","/" 
1650 DATA 181 
1660 DATA ITBOVZ,WQVXGREVZ,TVMWZZ,OXSVNBZ,MGRJFVZ,JFVLFHZ: 
1670 DATA HBOFNZ,VOUIBY,ORGAPIRVTY,LFITVLRHRVY,FHSBY,BXOVX: 
1680 DATA ORJFVX,LMEVITVX,LABX,RMLHZFIW,BMZNRXW,OVXGILVMXVKSZOLTIZNV
1690 DATA JFZORAZGRLMV,OZHPU,OZELIU,IRHPBU,FZIGAJ,ZOEZMRXT: 
1700 DATA ZDPT,RANLT,LDMT,ZMWPVIXSRVUS,VCZTLMS,RWVLFHS: 
1710 DATA BKMLGRXS,TFZMZR,MXLTMRGLR,MWRERWFZOR,VDVOQ,FWTVQ: 
1720 DATA SZPRP,ZABO,RXLIRXVO,R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