Alright now that we have those in place, how do we replace them with a correctly guessed letter?
Ex:
Paper..
_ _ _ _ _
they guess a P
P _ p _ _
Ex:
Paper..
_ _ _ _ _
they guess a P
P _ p _ _
:"-
Pause Ans
"HELLO->Str1
:Disp Ans
"HELLO->Str1
:Disp Ans
:Lbl 5
:0->W
:0->G
:0->R
:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str3
:ClrHome
:ClrDraw
:AxesOff
:Input "Your word please",Str1
:Text(1,1,"Number of letters"
:"-
:For(L,2,length(Str1
:Ans+"-
:End
:Text(8,1,Ans
:Pause
:Lbl 1
:ClrHome
:Input "pick one letter ",Str2
:Repeat Z=0
:inString(Str3,Str2)->H
:inString(Str1,Str2,N)->Z
:inString(Str1,Str2)->F
:If F=0
:Goto 2
:If Z>0
:R+1->R
:Lbl 3
:If W=6
:Goto 4
:Text(16,1,"Number of letters in word"
:Text(24,1,R
:Z+1->N
:inString(Str3,Str2)->I
:If I=0
:Goto 6
:"/"+Str3+"/"->Str3
:sub(Str3,2,H)+"/"+sub(Str3,H+2,27-H->Str3
:sub(Str3,2,26)->Str3
:0->R
:1->N
:1->Z
:Text(40,40,sub(Str3,1,13
:Text(50,40,sub(Str3,14,13
:Line(-8,-9,-3,-9
:Line(-4,-9,-4,0
:Line(-4,0,-7,0
:Line(-7,0,-7,-2
:Pause
:Goto 1
:Lbl 2
:W+1->W
:If W=1
:Circle(-7,-3,1
:If W=2
:Line(-7,-4,-7,-7
:If W=3
:Line(-7,-7,-7.5,-8
:If W=4
:Line(-7,-7,-6.5,-8
:If W=5
:Line(-7,-5,-7.5,-6
:If W=6
:Line(-7,-5,-6.5,-6
:End
:Pause
:Goto 3
:Lbl 4
:ClrHome
:ClrDraw
:Circle(0,0,4
:Text(5,25,"You have lost"
:Text(26,40,"X
:Text(26,52,"X
:Text(45,28,"Play again?"
:Text(53,16,"Yes"
:Text(53,70,"No"
:Line(0,-1,-1,-2
:Line(0,-1,1,-2
:Getkey->K
:While K=0
:If K=12
:Then
:Goto 5
:If K=14
:Then
:Goto 7
:End
:Lbl 6
:ClrHome
:Output(3,5,"Already
:Output(5,5,"Guessed!
:Pause
:Goto 1
:Lbl 7
:Output(3,5,"Made by"
:Output(5,2,"Josh Beckwith"
:Getkey->K
:While K=0
:If K=12
:Then
:Goto 5
:If K=14
:Then
:Goto 7
:End
:Repeat K=12 or K=14
:getKey->K:End
:If K=12:Goto 5
:Goto 7 //otherwise, K must be 14//
Advertisement