1 ON ERROR GOTO3
2 GOTO 10
3 MODE7
4END
10 REM ---------------------------
20 REM HANGMAN GAME (C)22/10/95
30 REM D.CHESTER ENTERPRISES
40 REM NOT FOR RESALE OR HIRE
41 REM (!)
50 REM ---------------------------
99 DIMW$(50):REM MAKE SURE THIS NO. I
S BIGGER THAN THE NUMBER OF ITEMS IN DAT
A
100 MODE1
105 W=0
110 COLOUR1
120 PRINTTAB(10);" *** HANGMAN ***"
121PRINT:PRINT:PRINT
130 COLOUR2
131 T=5
140 PRINTTAB(T);"The object of this ga
me is to"
145 PRINTTAB(T);"guess the hidden word
."
150 PRINTTAB(T);"Press the letter that
you want"
160 PRINTTAB(T);"to try. If you are ri
ght then"
170 PRINTTAB(T);"the letter will be re
vealed,"
180PRINTTAB(T);"making the word easier
to guess."
190 PRINTTAB(T);"If you get the letter
wrong, your"
200 PRINTTAB(T);"man gets another step
closer"
210 PRINTTAB(T);"to meet the";:COLOUR1
:PRINT" HANGMAN";:COLOUR2:PRINT"."
220 PRINT:PRINT:PRINT:PRINT:PRINT"Plea
se press any key to go on......"
221 PRINTTAB(3,30);"PRESS ESCAPE WHEN
YOU'VE FINISHED"
230 A$=GET$:IFA$=""THEN 230
300 :
301 VDU23;8202;0;0;0;
310 RESTORE
320 W=0
321 TG$=""
330 READW$:IFW$="Z"THEN 350 ELSE W$(W)
=W$
340 W=W+1:GOTO330
350 REM WORDS IN MEMORY
399 REM NOW TO PICK A WORD
400 X=RND(1)*W
410 GW$=W$(X)
420 GW=LEN(GW$)
430 CLS
431 VDU23;8202;0;0;0;
440 COLOUR1:PRINTTAB(10);" *** HANGM
AN ***"
450 X=40-GW:X=X/2
451 PRINT'''''
460 MW$="":FORA=1TOGW:MW$=MW$+"*":NEXT
A
500 REM INPUTTING LETTERS NOW
510 COLOUR2:PRINTTAB(6,10);"Press the
letter you want to try"
520 T=0
522 W=0
525 COLOUR1
530 PRINTTAB(X,6);MW$
535 T$=GET$:IFT$=""THEN 535
540 IFT$<"A" OR T$>"Z"THEN 535
545 GL=ASC(T$):GL=GL-64
546 G=0
550 PRINTTAB(7+GL,15);T$
555 TG$=""
560 FOR A=1 TO GW:IF MID$(GW$,A,1)=T$
THEN TG$=TG$+T$ :G=1:GOTO 570
565 TG$=TG$+MID$(MW$,A,1)
570 NEXTA
571 MW$=TG$
572 IFMW$=GW$THEN 2000
580 IFG=1THEN 530
590 W=W+1:IFW=10 THEN 1000
591 GOSUB 600
592 GOTO 530
600 IFW=1THEN MOVE400,20:DRAW400,500
610 IFW=2THEN DRAW812,500
620 IFW=3THEN DRAW 812,450
630 IFW=4THEN DRAW825,450:DRAW850,425:
DRAW850,400:DRAW825,375:DRAW800,375
640 IFW=4THEN DRAW775,400:DRAW775,425:
DRAW800,450:DRAW812,450
650 IFW=5THEN MOVE812,375:DRAW812,250
660 IFW=6THEN MOVE762,320:DRAW812,340
670 IFW=7THEN DRAW 862,320
680 IFW=8THEN MOVE812,250:DRAW762,180
690 IFW=9THEN MOVE812,250:DRAW862,180
750 RETURN
1000 MODE2
1010 GCOL0,8
1011 COLOUR2
1020 FORW=1TO10:GOSUB600:NEXTW
1021 PRINTTAB(0,1);" WRONG"
1030 PRINTTAB(2);"THE WORD WAS :"
1035 COLOUR15
1040 PRINT:PRINTGW$
1042 COLOUR2
1045PRINT:PRINT
1050 PRINT:PRINT"PRESS A KEY"
1060 A$=GET$:IFA$=""THEN 1060
1070 MODE1:GOTO300
2000 MODE2:COLOUR3
2001 GW=20-GW
2002 GW=GW/2
2004 PRINT" CORRECT"
2005 PRINT''
2010 PRINT"THE RIGHT ANSWER WAS"
2015 COLOUR 4
2016PRINT''
2020 PRINTTAB(GW);GW$
2021 PRINT''
2025 COLOUR6
2030 PRINT'''''"PRESS A KEY TO START"
2040 PRINT" AGAIN"
2050 A$=GET$:IFA$=""THEN2050
2060 MODE1:GOTO300
10000 DATA TABLE,KEYS,PEN,DIAMOND,BOOK,G
IRL,BOY,SYSTEM,CARTRIDGE,MEMORY,MONEY
10001 DATA MAGAZINE,CALCULATOR,UNIFORM,B
OMB,SEASIDE,SOFTWARE,GLEAMING,SQUIRREL,S
ATELLITE,RECORDER,CAPTAIN,FUEL,RENDEZVOU
S,SCIENTIST,PROFESSOR
10002 DATA RESEARCH,ATLANTIS,STRATOSPHER
E,COMPLETE,CREATURE,CAT,DOG,MOUSE,HORSE,
FROG,TELEPHONE,WINDOW,DOOR
19999 DATA Z