You need to change the way the IfChoosenInString: gosub works. The letter may appear several times in the quote. With the way you have it now if the quote was.
"hello"
the user would have to guess "l" twice as you return from the gosub when you find the first "l" and the second one would remain as an underscore.
`check if the letter the user chosse is in the quote
IfChoosenInString:
`make it repeat for every letter in the quote
For i = 1 to len(ChosenQuote)
`get the letter in the quote
TestingIfLetterInQuote = mid$(ChosenQuote, xi)
`if the letter is in the quote then make them apear and then return to the loop
if TestingIfLetterInQuote = CurrentLetterChoosen
return
endif
`
`if the length of the quote is equal to to the time looped then the letter is in the quote
`so add something to the hanger
If i = len(ChosenQuote)
Gosub HangTheMan
return
endif
next i
return
I would change it to something like this
IfChoosenInString:
found = 0 : `change to 1 if we find CurrentLetterChoosen in the chosenQuote
For i = 1 to len(ChosenQuote)
`check if we have found the letter we are looking for
if mid$(chosenQuote, i) = CurrentLetterChoosen
`change the _ in UnderscoredQuote to CurrentLetterChoosen
temp$ = left$(UnderscoredQuote,i-1)
temp$ = temp$ + CurrentLetterChoosen
temp$ = temp$ + right$(UnderscoredQuote,len(UnderscoredQuote)-i)
UnderscoredQuote = temp$
endif
next i
cls
Set cursor 0, 200
print UnderscoredQuote
`check if the guess was incorrect
if found = 0
gosub HangTheMan
endif
return
For that to work you will need to put the extra spaces in the quote like
Quotes(1) = "T h e e a r l y b i r d g e t s t h e w o r m ."
and not put them in in the ConvertQuoteToUnderscores: gosub
i won't see you in the pit