
-----------------------------------
Danyn
Mon Nov 11, 2013 3:53 pm

Need help with hangman game
-----------------------------------
What is it you are trying to achieve?
I want to add a letter tracker to my program and I want to disable repeated letters from affecting the game.


What is the problem you are having?
I have no clue how to do so.


Describe what you have tried to solve this problem
I've tried using variables and put statements but nothing has worked.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




var word, category, hidden : string
var life : boolean
var guess : string (1)
var point1, point2, bodypart, colourIntro : int
var font2 := Font.New ("georgia:40")

bodypart := 0



procedure death
    %Draws the death stage
    drawline (50, 40, 250, 40, 255)
    drawline (200, 40, 200, 270, 255)
    drawline (200, 270, 125, 270, 255)
    drawline (125, 270, 125, 240, 255)
end death


%Asks for word
locate (15, 33)
put "What's the word?"
locate (16, 35)
get word : *
word := Str.Upper (word)
cls

%Asks for category
locate (15, 33)
put "What's the category?"
locate (16, 35)
get category : *
cls

%converts the word to hidden
hidden := ""
for i : 1 .. length (word)
    if word (i) >= "A" and word (i) 