10 REM HANGMAN.BAS CP/M MBASIC 5.2 Z-89 GRAPHICS 02/81
20 CLEAR 1000:WIDTH 255:DIM A$(20),A1$(20)
30 E$=CHR$(27):E1$=E$+"E":F$=E$+"F":G$=E$+"G":P$=E$+"p":Q$=E$+"q":Y$=E$+"Y"
40 J$=E$+"J":K$=E$+"K":X1$=E$+"x1":X5$=E$+"x5":Y5$=E$+"y5":Q1$=CHR$(34)
50 Q1$=CHR$(34):T$=CHR$(64):U$=CHR$(95)
60 PRINT E$;"E":PRINT:PRINT
70 PRINT TAB(30);E$;"p";"  HANGMAN  ";E$;"q"
80 PRINT:PRINT
90 PRINT "    This is the familiar game of `HANGMAN' that you used to play"
100 PRINT " when you were in Grade School. Your opponent will choose a word"
110 PRINT " and draw spaces representing the letters that make up the word."
120 PRINT
130 PRINT "    You must guess the letters.  Each incorrect guess will add a"
140 PRINT " new part of body to the HANGMAN's scaffold. So you have to be"
150 PRINT " sharp; otherwise . . . . . it's been good to know you!"
160 PRINT
170 PRINT "   There are three skill levels of play, with `1' being easiest."
180 PRINT
190 PRINT "   You may change the level after each game.   <PRESS RETURN>";:N$=INPUT$(1)
200 PRINT:PRINT
210 PRINT "         What skill level do you want? (1,2, or 3) "Y5$;
220 S$=INPUT$(1):IF VAL(S$)<1 OR VAL(S$)>3 THEN 210
230 PRINT X1$E1$X5$;:GOSUB 530:C=2:T=0:W=0:D=0:L$=""
240 RESTORE:FOR X=1 TO INT(50*RND(1))+1:READ O1$,O2$,O3$:IF O1$="000" THEN 240
250 NEXT X:IF S$="1" THEN B$=O1$
260 IF S$="2" THEN B$=O2$
270 IF S$="3" THEN B$=O3$
280 S=LEN(B$):FOR X=1 TO S:A1$(X)="i":A$(X)=MID$(B$,X,1):NEXT X
290 PRINT E$"k"F$;:FOR X=1 TO S:PRINT A1$(X)" ";:NEXT X:PRINT
300 IF C=0 THEN PRINT Y$"0"CHR$(96+W)L$;
310 PRINT G$;:C=0:IF T=S THEN 480
320 IF D=1 THEN RETURN 
330 PRINT Y$"84"P$" Guess a letter  - "Q$" "Y5$;:L$=INPUT$(1):PRINT X5$L$
340 IF (ASC(L$)<65 OR ASC(L$)>90) AND (ASC(L$)<97 OR ASC(L$)>122) THEN 330
350 IF ASC(L$)>90 THEN L$=CHR$(ASC(L$)-32)
360 PRINT E$"l";:FOR X=1 TO S:IF L$=A1$(X) THEN PRINT "  ":GOTO 330
370 IF L$=A$(X) THEN A1$(X)=A$(X):C=1:T=T+1
380 NEXT X:IF C=1 THEN 290
390 W=W+1:ON W GOTO 620,630,640,650,660,670
400 D=1:FOR X=1 TO S:A1$(X)=A$(X):NEXT X:GOSUB 290
410 PRINT F$Y$"%Fww r"Y$"%VTHE GOVERNOR HAS NOT"Y$"&VSENT YOUR PARDON!"
420 FOR X=1 TO 19:PRINT Y$"2"CHR$(60+X)" ";:NEXT X:PRINT " "
430 PRINT G$Y5$Y$"8"Q1$
440 PRINT "To play again choose a skill level  (1,2 or 3) <END> ";:N$=INPUT$(1)
450 PRINT X5$E$"y1"E$"y3"Y$"  "E1$;
460 IF N$="1" OR N$="2" OR N$="3" THEN S$=N$:GOTO 230
470 SYSTEM
480 PRINT F$Y$Q1$"Fx "Y$"#Gx":IF W=0 THEN 510
490 PRINT Y$"&Fed";:IF W<5 THEN 510
500 PRINT Y$"1<}"STRING$(20,"p")"|"
510 PRINT Y$"%NYOUR  LAWYER USED THE  RIGHT"Y$"&OLETTERS AND GOT YOU OFF!"
520 GOTO 430
530 X$=Y$+"9%}i|":V$="x x":W$="y y"
540 PRINT E$"x3"Y$"      "F$STRING$(36,"{"):PRINT X$"   "V$Y$"!F"U$"r"
550 PRINT X$"  "V$:PRINT X$" "V$:PRINT X$V$:PRINT X$" x":PRINT X$"x"
560 FOR X=1 TO 6:PRINT X$:NEXT X
570 PRINT X$"y":PRINT X$" y":PRINT X$W$:PRINT X$" "W$:PRINT X$"  "W$
580 PRINT "  "STRING$(27,"p")STRING$(20,"z")STRING$(11,"p")
590 PRINT Y$Q1$"G|"Y$"#G|"Y$"$Exzzy"Y$"%E|  }"Y$"&Ey{{x"
600 PRINT Y$"0RLETTERS USED -"Y$"54WORD h "E$"j"G$;:RETURN
610 PRINT Y$"54WORD h "E$"j"G$;:RETURN
620 PRINT F$Y$"$Eiiii"Y$"%D"U$" ^^ r"Y$"&Eyaax"Y$"'F``"G$:GOTO 290
630 PRINT F$Y$"(Dzizziz"Y$")D|i  i}"Y$"*D|i  i}"Y$"+Dyi{{ix"G$:GOTO 290
640 PRINT F$Y$"(Cx"Y$")Bxx"Y$"*Axx"Y$"+A"U$"*"G$:GOTO 290
650 PRINT F$Y$"(Jy"Y$")Jyy"Y$"*Kyy"Y$"+K*r"G$:GOTO 290
660 PRINT F$Y$",D|"Y$"-Cx  x"Y$".C| }"Y$"/C| }"Y$"0Cuuu"G$:GOTO 290
670 PRINT F$Y$",I}"Y$"-Gy  y"Y$".H| }"Y$"/H| }"Y$"0Huuu"G$:GOTO 400
680 DATA PAPER,CALENDAR,SPONGE
690 DATA DOCTOR,MAGAZINE,SYMPATHETIC
700 DATA BOOK,TELEVISION,UNDERSTAND
710 DATA DOOR,RADIO,INCONVENIENT
720 DATA NURSE,CONDITION,PHOTOGRAPHIC
730 DATA CLOSE,PRINT,SYZYGY
740 DATA ERASE,LIBRARY,QUARTZ
750 DATA TALK,SCHOOL,ANTHROPOLOGY
760 DATA WALK,COLLEGE,MELANCHOLY
770 DATA LOOK,PRINCIPLE,MOSAIC
780 DATA TREE,RECORDER,QUAVER
790 DATA HOUSE,PAUSE,MYSTERY
800 DATA AUTO,LUNCH,ORGANIC
810 DATA TRUCK,HOUSE,QUALIFY
820 DATA SKATE,MIDDLE,MYTHOLOGICAL
830 DATA BALL,FIREPLACE,ORCHESTRATE
840 DATA MOST,ALIGNMENT,PREJUDICE
850 DATA ALWAYS,PORTABLE,PROXY
860 DATA OVER,MODIFY,QUADRANT
870 DATA UNDER,VILLAGE,PYRAMID
880 DATA BACK,CARPET,PHYCHOPATH
890 DATA LETTER,PICTURE,PRONOUNCIATION
900 DATA MAIL,EXPOSURE,ANIMOSITY
910 DATA SHIRT,SURFBOARD,VERSATILITY
920 DATA WATER,TELEPHONE,VITALIZE
930 DATA DRINK,MOUTH,KLEPTOMANIAC
940 DATA NUMBER,MULTIPLY,NYMPHOMANIA
950 DATA TRAY,DRAWER,SYNCRONIZATION
960 DATA STOP,CATIPILLAR,GYNECOLOGIST
970 DATA TALL,BOOKLET,PHILANTHROPIST
980 DATA LONG,KEYBOARD,AMBIDEXTERITY
990 DATA SHORT,MANSION,SUPERCILIOUS
1000 DATA SMALL,CHRISTMAS,TRANQUILLITY
1010 DATA SAVE,TRESPASS,TYRANNY
1020 DATA KEYS,COMMITTEE,PSEUDONYM
1030 DATA ENTER,PACIFY,EXTINGUISHER
1040 DATA CROSS,PROGRAM,HETEROGENEOUS
1050 DATA ACROSS,EDUCATION,SURREPTITIOUS
1060 DATA MOUSE,STOVE,EXTRAVAGANT
1070 DATA DUCK,MONTH,DISPROPORTIONATELY
1080 DATA MONEY,SATURDAY,ENTHUSIASTIC
1090 DATA COIN,DRUNKARD,ENCYCLOPEDIA
1100 DATA FLOOR,NORMAL,EUPHEMISM
1110 DATA BROWN,ULTIMATE,IONIZATION
1120 DATA HOLD,TEMPERATURE,JEOPARDIZE
1130 DATA STAIRS,COMMISSIONER,JODHPURS
1140 DATA BIKE,FATIGUE,LARYNX
1150 DATA TABLE,JEOPARDY,KNUCKLE
1160 DATA GRADE,LITERATURE,EFFERVERSCENT
1170 DATA TEACHER,ADMIRE,FRAUDULENT
1180 DATA GREY,TERMINAL,PARTISANSHIP
1190 DATA 000,000,000
DE,LITERATURE,EFFER