home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
games
/
changman.amos
/
changman.amosSourceCode
Wrap
AMOS Source Code
|
1989-07-09
|
24KB
|
591 lines
Break Off
Dim USEDGUESS$(26),WRDS$(300),FLAGS(9),XPOS(8)
Global USEDGUESS$(),WRDS$(),FLAGS(),XPOS()
Global X13,WORD,AMOUNT,T,P,F,L$,POS,SWITCH1,IMAGE,_ENDER,CORRECTWORD,WRONGWORD,WORDQTY,GUESSES,NOCRY,STAYPUT,HELPWORD$,HELPUSED
INITIALIZE
Procedure INITIALIZE
Screen Open 0,320,170,32,Lowres
Curs Off : Cls 0 : Flash Off : Hide On
Load "HangMan:Sprites/GuardSprite.Abk",1
Load "HangMan:Sprites/Prisoner.Abk",1
Load "HangMan:Sprites/SmallGallows.Abk",1
Load "HangMan:Sprites/Ghost.Abk",1
Load "HangMan:Pics/Scenery.Abk",6
Load "HangMan:Pics/Panel2.Abk",7
Load "HangMan:Sounds/Horn.Abk",5
Load "HangMan:Sounds/Stunner.Abk",8
Load "HangMan:Sounds/Cascade.Abk",9
Load "HangMan:Sounds/Alert4.Abk",10
Get Sprite Palette
SWITCH1=0 : SWITCH2=0
_GET_WORDS
Unpack 6 To 0
Double Buffer
For L=1 To 13 : Channel L To Bob L : Next L
Screen Open 1,320,90,16,Lowres
Curs Off : Cls 0 : Flash Off : Hide On
Unpack 7 To 1
Screen Display 1,135,220,320,90
CORRECTWORD=0 : WRONGWORD=0 : WORDQTY=0 : GUESSES=0 : TUNE=True : STAYPUT=False
End Proc
MAINCONTROL
Procedure MAINCONTROL
Do
Wait 25 : ENTERGUARDS
INIT_RIGHT_GUESS
Randomize Timer
WORD=Rnd(300) : If WORD=0 : WORD=1+Rnd(4) : End If
T=Len(WRDS$(WORD)) : POS=15
HELPWORD$=Space$(T) : Rem *** Initialize Helpword with spaces ***
Screen 1 : Paper 11 : Locate 14,2 : Cline(25)
Locate 14,3 : Cline(25)
For L=1 To T
Pen 1 : Paper 11 : Locate POS,2 : Print "_"
Inc POS
Next L
AMOUNT=0 : P=1
TESTER
Loop
Edit
End Proc
Procedure ENTERGUARDS
If Not STAYPUT
Screen 0
Bob 9,-70,100,6 : Bob 10,-50,100,24 : Bob 11,-30,100,6 : Rem ** 2 Guards + Prisoner **
A$="Anim 0,(6,10)(7,10)(8,10) ;" : A$=A$+"Move 270,0,200"
P$="Anim 0,(24,10)(25,10)(26,10) ;" : P$=P$+"Move 270,0,200"
B$="Anim 0,(6,10)(7,10)(8,10) ;" : B$=B$+"Move 270,0,200"
Amal 9,A$ : Amal 10,P$ : Amal 11,B$ : Amal On
Repeat : S=Chanmv(11) : Until S=0
Amal Off : Bob 9,,,1 : Bob 10,,,19 : Bob 11,,,1
End If
End Proc
Procedure TESTER
For B=1 To 9 : FLAGS(B)=0 : Next B : Rem *** No Gallows Used ***
IMAGE=35 : _ENDER=False : NOCRY=True
Limit Mouse 140,265 To 430,294
Repeat
SWITCH1=0 : FLAG=0 : P=1 : Screen 1 : Locate 2,4 : Cline(28)
Pen 7 : Locate 2,4 : Print "Click letter of your choice"
_SETZONES
L$=Space$(1) : Show On
_GETCHOICE
CHECK_IF_USED_OR_NOT
If SWITCH1=0
For H=P To T
F=Instr(WRDS$(WORD),L$,P)
If F<>0
FLAG=1 : Inc AMOUNT : P=F+1 : Pen 1 : Locate 14+F,2 : Print L$
Mid$(HELPWORD$,F,1)=L$
_FILL_USED_ARRAY
End If
Next H
If FLAG=1 and AMOUNT<T
Locate 2,4 : Cline(28)
Pen 1 : Locate 2,4 : Print "Correct!"
Sam Bank 10 : Sam Play 1 : Screen 0
A$="Anim 6,(31,8)(32,8)" : Amal 10,A$ : Amal On 10
Wait 1 : While Chanan(10) : Wend
Amal Off 10 : Bob 10,,,19 : Screen 1
End If
If FLAG=1 and AMOUNT=T
Locate 2,4 : Cline(28)
Pen 1 : Locate 2,4 : Print "Well Done!"
Sam Loop On : Sam Bank 9 : Sam Play 1 : Screen 0
A$="Anim 6,(31,8)(32,8)" : Amal 10,A$ : Amal On 10
Wait 1 : While Chanan(10) : Wend : Sam Loop Off
Amal Off 10 : Bob 10,,,19 : Screen 1
End If
If FLAG=0 and SWITCH1=0
Locate 2,4 : Cline(28)
Pen 1 : Locate 2,4 : Print "Sorry! Wrong choice"
Sam Bank 5 : Sam Play 1 : Screen 0 : Bob 10,,,34
_ADDGALLOWS
If NOCRY : Bob 10,,,19 : End If
Wait 20 : Inc GUESSES : Screen 1 : Locate 2,4 : Cline(28)
_FILL_USED_ARRAY
End If
End If
If SWITCH1=1
Locate 2,4 : Cline(28)
Screen 1 : Pen 1 : Locate 2,4 : Print "You have used that letter"
Sam Bank 8 : Sam Play 1 : Wait 80 : Locate 2,4 : Cline(28)
End If
Until AMOUNT>=T
Inc WORDQTY : Reserve Zone
If Not _ENDER : Inc CORRECTWORD : RELEASEGALLOWS : STAYPUT=True : End If
End Proc
Procedure INIT_RIGHT_GUESS
For L=1 To 26
USEDGUESS$(L)=Space$(1)
Next L
End Proc
Procedure CHECK_IF_USED_OR_NOT
For CR=1 To 26
If USEDGUESS$(CR)=L$
SWITCH1=1 : Exit
End If
Next CR
End Proc
Procedure _FILL_USED_ARRAY
For R=1 To 26
If USEDGUESS$(R)=Space$(1)
USEDGUESS$(R)=L$ : Exit
End If
Next R
End Proc
Procedure _GET_WORDS
For I=1 To 300
Read WRDS$(I)
Next I
Data "apple","happy","school","teacher","moon","horse","cups","book","dolls","flag"
Data "house","chair","table","clock","video","picture","torch","lollypop","lamp","chalk"
Data "baby","girl","number","gold","silver","shoes","crisps","caravan","animal","cottage"
Data "sunny","sport","trees","beach","watch","orange","lemon","summer","spring","winter"
Data "cooking","pencil","music","coats","scarf","scarecrow","flower","rabbit","truck","story"
Data "world","hello","friend","travel","because","choose","going","another","thing","remember"
Data "together","squirrel","fierce","elephant","surprise","learning","around","really","numbered","ordinary"
Data "behave","indeed","where","found","anyway","enough","jungle","tangled","block","everything"
Data "different","according","touch","reach","mention","understand","better","usually","sometimes","branch"
Data "trunk","monkey","fingers","wrapped","climbing","swinging","continue","chance","forest","nothing"
Data "leaves","suddenly","silence","insect","earth","crash","giant","sound","nearby","river"
Data "night","music","concert","parrot","chorus","these","drink","licking","heard","voice"
Data "danger","spiteful","capture","anybody","heart","spend","riding","branch","practice","before"
Data "remind","really","alive","search","shadow","without","looking","careful","however","fresh"
Data "print","ground","tractor","follow","light","complete","chance","breeze","carry","scent"
Data "sense","space","planet","point","hearing","simply","large","attack","reason","strong"
Data "buffalo","knock","powerful","limit","beautiful","angry","shining","brilliant","colour","somewhere"
Data "between","wonderful","fierce","family","stripe","stone","crafty","confuse","cunning","clever"
Data "snake","acrobat","clown","circus","escape","water","always","respect","plate","train"
Data "avoid","challenge","caught","mountain","corner","become","visitor","steel","waiting","crocodile"
Data "magnet","aeroplane","excited","given","luckiest","second","telephone","thinks","computer","learned"
Data "first","propeller","gives","twist","playground","spinning","round","squeak","looks","examine"
Data "liked","exciting","climbs","climbed","aboard","cockpit","fallen","complain","thing","struggle"
Data "helped","sellotape","engine","wonder","front","explore","beneath","below","silly","himself"
Data "herself","sadly","gladly","telling","cowboy","flying","goggles","swimming","skates","ready"
Data "supper","breakfast","dinner","lunch","circle","square","triangle","octopus","hamster","children"
Data "cupboard","indian","soldier","eating","exercise","outside","problem","given","having","trying"
Data "holiday","wanted","christmas","easter","queen","fairy","kingdom","invited","wisdom","island"
Data "health","forgotten","castle","princess","prince","changed","sleep","wearing","adventure","stairs"
Data "mouse","passed","kissed","married","happily","banana","design","imagine","increase","fireworks"
End Proc
Procedure _SETZONES
Screen 1 : Reserve Zone 26 : Reset Zone
X1=17 : X2=35 : Y1=47 : Y2=57
For L=1 To 13
Set Zone L,X1,Y1 To X2,Y2
Add X1,22 : Add X2,22
Next L
X1=17 : X2=35 : Y1=62 : Y2=71
For L=14 To 26
Set Zone L,X1,Y1 To X2,Y2
Add X1,22 : Add X2,22
Next L
End Proc
Procedure _GETCHOICE
Do
M=Mouse Zone : HELPKEY=Key State(95) : Z$=Inkey$ : CLICK=Mouse Click
If Z$=Chr$(27) : Reserve Zone : QUIT : End If
If HELPKEY : Inc HELPUSED : PLEASEHELP : End If
If CLICK=1 and M=1 : Reserve Zone : L$="a" : Hide On : Exit : End If
If CLICK=1 and M=2 : Reserve Zone : L$="b" : Hide On : Exit : End If
If CLICK=1 and M=3 : Reserve Zone : L$="c" : Hide On : Exit : End If
If CLICK=1 and M=4 : Reserve Zone : L$="d" : Hide On : Exit : End If
If CLICK=1 and M=5 : Reserve Zone : L$="e" : Hide On : Exit : End If
If CLICK=1 and M=6 : Reserve Zone : L$="f" : Hide On : Exit : End If
If CLICK=1 and M=7 : Reserve Zone : L$="g" : Hide On : Exit : End If
If CLICK=1 and M=8 : Reserve Zone : L$="h" : Hide On : Exit : End If
If CLICK=1 and M=9 : Reserve Zone : L$="i" : Hide On : Exit : End If
If CLICK=1 and M=10 : Reserve Zone : L$="j" : Hide On : Exit : End If
If CLICK=1 and M=11 : Reserve Zone : L$="k" : Hide On : Exit : End If
If CLICK=1 and M=12 : Reserve Zone : L$="l" : Hide On : Exit : End If
If CLICK=1 and M=13 : Reserve Zone : L$="m" : Hide On : Exit : End If
If CLICK=1 and M=14 : Reserve Zone : L$="n" : Hide On : Exit : End If
If CLICK=1 and M=15 : Reserve Zone : L$="o" : Hide On : Exit : End If
If CLICK=1 and M=16 : Reserve Zone : L$="p" : Hide On : Exit : End If
If CLICK=1 and M=17 : Reserve Zone : L$="q" : Hide On : Exit : End If
If CLICK=1 and M=18 : Reserve Zone : L$="r" : Hide On : Exit : End If
If CLICK=1 and M=19 : Reserve Zone : L$="s" : Hide On : Exit : End If
If CLICK=1 and M=20 : Reserve Zone : L$="t" : Hide On : Exit : End If
If CLICK=1 and M=21 : Reserve Zone : L$="u" : Hide On : Exit : End If
If CLICK=1 and M=22 : Reserve Zone : L$="v" : Hide On : Exit : End If
If CLICK=1 and M=23 : Reserve Zone : L$="w" : Hide On : Exit : End If
If CLICK=1 and M=24 : Reserve Zone : L$="x" : Hide On : Exit : End If
If CLICK=1 and M=25 : Reserve Zone : L$="y" : Hide On : Exit : End If
If CLICK=1 and M=26 : Reserve Zone : L$="z" : Hide On : Exit : End If
Loop
End Proc
Procedure PLEASEHELP
H=Instr(HELPWORD$,Space$(1))
C$=Mid$(WRDS$(WORD),H,1)
Screen 1 : Pen 1 : Paper 11
For L=1 To 5
Locate 30,2 : Print "Try ";C$
Wait 8 : Locate 30,2 : Cline(6)
Wait 10
Next L
End Proc
Procedure _ADDGALLOWS
If IMAGE<45 : Inc IMAGE : End If
If IMAGE=36 : BASE : End If
If IMAGE=37 : STAIRS : End If
If IMAGE=38 : LEFTPOST : End If
If IMAGE=39 : RIGHTPOST : End If
If IMAGE=40 : _TOPPOST : End If
If IMAGE=41 : LEFTBRACE : End If
If IMAGE=42 : RIGHTBRACE : End If
If IMAGE=43 : ROPE : End If
If IMAGE=44 : HANGMAN : End If
End Proc
Procedure BASE
Screen 0 : Bob 12,-105,100,13 : Bob 1,-88,125,36
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 155,0,165"
B$="Move 155,0,165"
Amal 12,A$ : Amal 1,B$ : Amal On
Repeat : POST=Chanmv(1) : Until POST=0
Wait Vbl : Amal Off : FLAGS(1)=1 : Bob 12,45,,1 : Screen 1
End Proc
Procedure STAIRS
Screen 0 : Bob 12,,,2
A$="Anim 0,(2,8)(3,8)(4,8) ;" : A$=A$+"Move -155,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 2,-88,125,37 : Rem ** Position Stairs **
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 170,0,165" : Rem ** Anin + Move Guard **
B$="Move 170,0,175" : Rem ** Move Stairs **
Amal 12,A$ : Amal 2,B$ : Amal On
Repeat : POST=Chanmv(2) : Until POST=0
Wait Vbl : Amal Off : Bob 12,45,,1 : FLAGS(2)=1 : Screen 1
End Proc
Procedure LEFTPOST
Screen 0 : Bob 12,,,2
A$="Anim 0,(2,10)(3,10)(4,10) ;" : A$=A$+"Move -155,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 3,-89,48,38 : Rem ** Position Left Post **
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 200,0,165" : Rem ** Anin + Move Guard **
B$="Move 197,0,165" : Rem ** Move Left Post **
Amal 12,A$ : Amal 3,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Bob 3,98,,38 : Rem ** Position Guard + Post at bottom of stairs **
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Climb Stairs **
B$="Move 0,-8,100"
Amal 12,A$ : Amal 3,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Wait 10 : Bob 12,,,16 : Bob 3,87,,38
A$="Anim 0,(16,12)(17,12)(18,12) ;" : A$=A$+"Move -25,0,95" : Rem ** Move Guard + Post Left **
B$="Move -16,0,85"
Amal 12,A$ : Amal 3,B$ : Amal On
Repeat : POST=Chanmv(3) : Until POST=0
Bob 12,,,3 : Bob 12,,,1
A$="Anim 0,(6,12)(7,12)(8,12) ;" : A$=A$+"Move 25,0,85" : Rem ** Move Guard away from Gallows **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(2,12)(3,12)(4,12) ;" : A$=A$+"Move -40,0,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Wait Vbl : Amal Off : Bob 12,,,1 : FLAGS(3)=1 : Screen 1
End Proc
Procedure RIGHTPOST
Screen 0 : Bob 12,,,2
A$="Anim 0,(2,10)(3,10)(4,10) ;" : A$=A$+"Move -155,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 4,-91,48,39 : Rem ** Position Right Post **
A$="Anim 0,(13,12)(14,12)(15,12) ;" : A$=A$+"Move 200,0,175" : Rem ** Anin + Move Guard **
B$="Move 197,0,165" : Rem ** Move Right Post **
Amal 12,A$ : Amal 4,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Bob 4,105,,39 : Rem ** Position Guard + Post at bottom of stairs **
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Climb Stairs **
B$="Move 0,-8,100"
Amal 12,A$ : Amal 4,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Wait 10 : Bob 12,,,13 : Bob 4,114,,39
A$="Anim 0,(13,12)(14,12)(15,12) ;" : A$=A$+"Move 40,0,95" : Rem ** Move Guard + Post Right **
B$="Move 37,0,85"
Amal 12,A$ : Amal 4,B$ : Amal On
Repeat : POST=Chanmv(4) : Until POST=0
Bob 12,,,8 : Bob 12,,,1
A$="Anim 0,(2,12)(3,12)(4,12) ;" : A$=A$+"Move -35,0,85" : Rem ** Move Guard away from Gallows **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(2,12)(3,12)(4,12) ;" : A$=A$+"Move -40,0,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Wait Vbl : Amal Off : Bob 12,,,1 : FLAGS(4)=1 : Screen 1
End Proc
Procedure _TOPPOST
Screen 0 : Bob 12,,,2
A$="Anim 0,(2,8)(3,8)(4,8) ;" : A$=A$+"Move -155,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 5,-118,125,40 : Rem ** Position Top Post **
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 200,0,175" : Rem ** Anin + Move Guard **
B$="Move 195,0,165" : Rem ** Move Top Post **
Amal 12,A$ : Amal 5,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Rem ** Position Guard + Top Post at bottom of stairs **
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Climb Stairs **
B$="Move 0,-23,100"
Amal 12,A$ : Amal 5,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Amal Off : Bob 12,,,5 : B$="Move 0,-63,90" : Amal 5,B$ : Amal On
Repeat : POST=Chanmv(5) : Until POST=0
Wait 10 : Bob 12,,,1
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(2,8)(3,8)(4,8) ;" : A$=A$+"Move -40,0,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Wait Vbl : Amal Off : Bob 12,,,1 : FLAGS(5)=1 : Screen 1
End Proc
Procedure LEFTBRACE
Screen 0
A$="Anim 0,(2,10)(3,10)(4,10) ;" : A$=A$+"Move -155,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 6,-84,110,41 : Rem ** Position Left Brace **
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 200,0,175" : Rem ** Anin + Move Guard **
B$="Move 195,0,165" : Rem ** Move Left Brace **
Amal 12,A$ : Amal 6,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Rem ** Position Guard + Left Brace at bottom of stairs **
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Climb Stairs **
B$="Move 0,-10,90"
Amal 12,A$ : Amal 6,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Amal Off : Bob 12,,,5 : B$="Move -34,-54,90" : Amal 6,B$ : Amal On
Repeat : POST=Chanmv(6) : Until POST=0
Wait 10 : Bob 12,,,1
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(2,8)(3,8)(4,8) ;" : A$=A$+"Move -55,0,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Wait Vbl : Amal Off : Bob 12,,,1 : FLAGS(6)=1 : Screen 1
End Proc
Procedure RIGHTBRACE
Screen 0 : Bob 12,,,2
A$="Anim 0,(2,10)(3,10)(4,10) ;" : A$=A$+"Move -140,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 7,-84,110,42 : Rem ** Position Right Brace **
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 200,0,175" : Rem ** Anin + Move Guard **
B$="Move 195,0,165" : Rem ** Move Right Brace **
Amal 12,A$ : Amal 7,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Rem ** Position Guard + Right Brace at bottom of stairs **
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Climb Stairs **
B$="Move 0,-10,90"
Amal 12,A$ : Amal 7,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Amal Off : Bob 12,,,5 : B$="Move 19,-54,90" : Amal 7,B$ : Amal On
Repeat : POST=Chanmv(7) : Until POST=0
Wait 10 : Bob 12,,,1
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(2,8)(3,8)(4,8) ;" : A$=A$+"Move -55,0,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Wait Vbl : Amal Off : Bob 12,,,1 : FLAGS(7)=1 : Screen 1
End Proc
Procedure ROPE
Screen 0 : Bob 12,,,2
A$="Anim 0,(2,10)(3,10)(4,10) ;" : A$=A$+"Move -140,0,165"
Amal 12,A$ : Amal On 12
Repeat : POST=Chanmv(12) : Until POST=0
Bob 8,-74,90,43 : Rem ** Position Rope **
A$="Anim 0,(13,10)(14,10)(15,10) ;" : A$=A$+"Move 187,0,175" : Rem ** Anin + Move Guard **
B$="Move 182,0,165" : Rem ** Move Rope **
Amal 12,A$ : Amal 8,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,5 : Rem ** Position Guard + Rope at bottom of stairs **
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Climb Stairs **
B$="Move 0,-10,90"
Amal 12,A$ : Amal 8,B$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Amal Off : Bob 12,,,5 : B$="Move 0,-39,90" : Amal 8,B$ : Amal On
Repeat : POST=Chanmv(8) : Until POST=0
Wait 10 : Bob 12,,,1
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Bob 12,,,1
A$="Anim 0,(2,8)(3,8)(4,8) ;" : A$=A$+"Move -55,0,90" : Rem ** Move Guard Downstairs **
Amal 12,A$ : Amal On
Repeat : POST=Chanmv(12) : Until POST=0
Amal Off : Wait Vbl : Bob 12,,,1 : FLAGS(8)=1 : Screen 1
End Proc
Procedure HANGMAN
Screen 0
A$="Anim 0,(2,10)(3,10)(4,10) ;" : A$=A$+"Move -119,0,200"
P$="Anim 0,(20,10)(21,10)(22,10) ;" : P$=P$+"Move -118,0,200"
B$="Anim 0,(2,10)(3,10)(4,10) ;" : B$=B$+"Move -119,0,200"
Amal 9,A$ : Amal 10,P$ : Amal 11,B$ : Amal On
Repeat : S=Chanmv(11) : Until S=0
Amal Off : Bob 9,,,5 : Bob 10,,,23 : Bob 11,,,5
A$="Anim 0,(9,15)(10,15) ;" : A$=A$+"Move 0,-23,90" : Rem ** Guard Climb Stairs **
P$="Anim 0,(27,15)(28,15) ;" : P$=P$+"Move 0,-23,90" : Rem ** Prisoner Climb Stairs **
B$="Anim 0,(9,15)(10,15) ;" : B$=B$+"Move 0,-23,90" : Rem ** Guard Climb Stairs **
Amal 9,A$ : Amal 10,P$ : Amal 11,B$ : Amal On
Repeat : S=Chanmv(11) : Until S=0
Amal Off : Bob 9,,,1 : Bob 10,,,19 : Bob 11,,,1
Wait 10 : P$="Move 0,-5,70" : A$="Move 0,-5,70" : Amal 10,P$ : Amal 8,A$ : Amal On 10 : Amal On 8 : Bob 10,,,33 : Rem ** Prisoner Hung **
Repeat : S=Chanmv(10) : Until S=0
Amal Off : Wait Vbl : FLAGS(9)=1
Screen 1 : Locate 2,4 : Cline(28) : Locate 12,4 : Pen 1 : Print "YOU ARE HUNG!"
Screen 0 : SENDGHOST
RELEASEGALLOWS
Screen 1 : Locate 2,4 : Cline(28) : Locate 2,4 : Pen 1 : Print "The word was ... "
POS=15 : Pen 1 : Paper 11 : Locate POS,2 : Print WRDS$(WORD)
Wait 70 : Locate 2,4 : Cline(28) : Locate 2,4 : Print "Press a key to continue!" : Clear Key : Wait Key
Locate 2,4 : Cline(28)
AMOUNT=T : _ENDER=True : Inc WRONGWORD : NOCRY=False : STAYPUT=False
End Proc
Procedure RELEASEGALLOWS
Screen 0
If FLAGS(9)=1 : Wait 25 : TAKE_AWAY_BODY : End If
If FLAGS(1)=1
J$="Anim 0,(6,15)(7,15)(8,15) ;" : J$=J$+"Move 105,0,100" : Amal 12,J$ : Amal On 12
Wait 2 : Repeat : POST=Chanmv(12) : Until POST=0
Amal Off : Bob 12,155,,16 : X12=X Bob(12)
End If
For L=1 To 8
If FLAGS(L)=1 : XPOS(L)=X Bob(L) : End If
Next L
COUNT=1 : IMAGECOUNT=0 : NEWIMAGE=16
Repeat
If FLAGS(1)=1 : Bob 12,X12-COUNT,,NEWIMAGE : Bob 1,XPOS(1)-COUNT,,36 : End If
If FLAGS(2)=1 : Bob 2,XPOS(2)-COUNT,,37 : End If
If FLAGS(3)=1 : Bob 3,XPOS(3)-COUNT,,38 : End If
If FLAGS(4)=1 : Bob 4,XPOS(4)-COUNT,,39 : End If
If FLAGS(5)=1 : Bob 5,XPOS(5)-COUNT,,40 : End If
If FLAGS(6)=1 : Bob 6,XPOS(6)-COUNT,,41 : End If
If FLAGS(7)=1 : Bob 7,XPOS(7)-COUNT,,42 : End If
If FLAGS(8)=1 : Bob 8,XPOS(8)-COUNT,,43 : End If
Add COUNT,2 : Add IMAGECOUNT,1
If IMAGECOUNT mod 4=0
Add NEWIMAGE,1 : If NEWIMAGE>18 : NEWIMAGE=16 : End If
End If
Wait 1
Until COUNT>=190
End Proc
Procedure TAKE_AWAY_BODY
A$="Anim 0,(11,15)(12,15) ;" : A$=A$+"Move 0,23,120" : Rem ** Move Guard Downstairs **
Bob 10,,,35 : P$="Move 0,23,120" : Rem ** Move Dead Prisoner Downstairs **
B$="Anim 0,(11,15)(12,15) ;" : B$=B$+"Move 0,23,120" : Rem ** Move Guard Downstairs **
Amal 9,A$ : Amal 10,P$ : Amal 11,B$
Bob 10,,,19 : Amal On
Repeat : POST=Chanmv(11) : Until POST=0
A$="Anim 0,(13,15)(14,15)(15,15) ;" : A$=A$+"Move -150,0,120" : Rem ** Move Guard OffScreen **
P$="Move -150,0,120" : Rem ** Move Dead Prisoner OffScreen **
B$="Anim 0,(16,15)(17,15)(18,15) ;" : B$=B$+"Move -150,0,120" : Rem ** Move Guard OffScreen **
Amal 9,A$ : Amal 10,P$ : Amal 11,B$ : Bob 10,95,115,35 : Bob 11,128,,16 : Amal On
Repeat : POST=Chanmv(11) : Until POST=0
Amal Off
End Proc
Procedure SENDGHOST
X13=X Bob(10) : Y13=Y Bob(10)
Bob 13,X13,Y13,44 : Z$="Anim 0,(44,15)(45,15) ;" : Z$=Z$+"Move 0,-135,500"
Amal 13,Z$ : Amal On 13
Repeat : GHOUL=Chanmv(13) : Until GHOUL=0
End Proc
Procedure _SHOWSCORES
Screen 2 : Ink 16
For L=0 To 60 Step 2
Draw 50,40+L To 260,40+L : Draw 50,160-L To 260,160-L
Wait 4
Next L
For L=0 To 60
Draw 50,100-L To 260,100-L : Draw 50,100+L To 260,100+L
Wait 1
Next L
Ink 9 : Box 49,39 To 261,161
Ink 17 : Box 48,38 To 262,162
Ink 17 : Box 47,37 To 263,163
Pen 29 : Paper 16 : Locate 13,6 : Print "YOUR SCORES"
Pen 19 : Locate 7,8 : Print "Tries = ";WORDQTY
Locate 7,10 : Print "Completed Words = ";CORRECTWORD
Locate 7,12 : Print "Incomplete Words = ";WRONGWORD
Locate 7,14 : Print "Wrong Guesses = ";GUESSES
Locate 7,16 : Print "Used Help (Times) = ";HELPUSED
Pen 29 : Locate 9,18 : Print "Press Any Key To End"
Clear Key : Wait Key
Ink 16 : For L=0 To 120 : Draw 50,40+L To 260,40+L : Wait 1 : Next L
Pen 19 : Paper 16 : Locate 10,8 : Print "Thanks For Playing"
Locate 10,12 : Print "Play Again Soon!"
Wait 50 : QUIT2
End Proc
Procedure QUIT
Screen 1 : Hide On
Locate 2,4 : Cline(28) : Locate 2,4 : Pen 1 : Print "The word was ... "
POS=15 : Pen 1 : Paper 11 : Locate POS,2 : Print WRDS$(WORD) : Wait 150
Locate 14,2 : Cline(25) : Locate 2,4 : Cline(28)
Pen 1 : Locate 2,4 : Print "OK! Here are your scores ..."
Update : Wait 30 : Auto View Off
Screen Open 2,320,177,32,Lowres
Curs Off : Cls 0 : Flash Off : Get Palette 0
Screen Copy 0 To 2
Screen Display 2,,42,,
Screen Close 0 : View
_SHOWSCORES
End Proc
Procedure QUIT2
Screen 1 : Fade 5 : Wait 100 : Screen 2 : Fade 8 : Wait 120
For L=1 To 2
Screen Close L
Next L
Music Off : Erase 1 : Erase 5
For L=6 To 10
Erase L
Next L
Run "HangMan:Menu"
End Proc