
-----------------------------------
puventhar
Fri Dec 10, 2010 4:31 pm

Need Help With Hangman Menu
-----------------------------------
What is it you are trying to achieve?



What is the problem you are having?



Describe what you have tried to solve this problem



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
= 1 then
        put word(i)
        else
        Draw.Oval(200,200,20,20,10)
        end if
counter:=0
        end for
    View.Update
end game
procedure controls

end controls



procedure grid
    for x : 10 .. maxx by 10
        for y : 10 .. maxy by 10
            drawdot (x, y, black)
        end for
    end for
    for x : 10 .. maxx by 20
        Draw.Text (intstr (x), x - 3, maxy - 6, font, black)
    end for
    for y : 20 .. maxy by 20
        Draw.Text (intstr (y), maxx - 12, y - 3, font, black)
    end for
end grid

grid

process game1
    loop
        exit when stopanimation = true
        if stopanimation = false then
            for i : -30 .. 30
             exit when stopanimation=true
                Draw.FillBox (0, 0, 640, 400, brightgreen)
                var xincrease : int := 0
                var font2 : int
                font2 := Font.New ("bankgothic md bt:40")
                var width : int := Font.Width ("Hangman", font2)
                var height, ascent, descent, internalLeading : int
                Font.Sizes (font2, height, ascent, descent, internalLeading)
                Draw.Text ("Hangman", 190, 350, font2, black)
                Draw.Box (190, 330 + descent, 190 + width, 330 + height, brightblue)
                Font.Free (font2)
                Draw.ThickLine (10, 10, 150, 10, 10, black)
                Draw.ThickLine (80, 10, 80, 340, 10, black)
                Draw.ThickLine (80, 340, 200, 340, 10, black)
                Draw.ThickLine (80, 290, 140, 340, 10, black)
                Draw.ThickLine (202, 340, 202 + i, 260, 5, black)
                delay (20)
                GUI.Refresh
                View.Update
            end for
            for decreasing i : 30 .. -30
            exit when stopanimation=true
                Draw.FillBox (0, 0, 640, 400, brightgreen)
                var xincrease : int := 0
                var font2 : int
                font2 := Font.New ("bankgothic md bt:40")
                var width : int := Font.Width ("Hangman", font2)
                var height, ascent, descent, internalLeading : int
                Font.Sizes (font2, height, ascent, descent, internalLeading)
                Draw.Text ("Hangman", 190, 350, font2, black)
                Draw.Box (190, 330 + descent, 190 + width, 330 + height, brightblue)
                Font.Free (font2)
                Draw.ThickLine (10, 10, 150, 10, 10, black)
                Draw.ThickLine (80, 10, 80, 340, 10, black)
                Draw.ThickLine (80, 340, 200, 340, 10, black)
                Draw.ThickLine (80, 290, 140, 340, 10, black)
                Draw.ThickLine (202, 340, 202 + i, 260, 5, black)
                delay (20)
                GUI.Refresh
                View.Update          
            end for
        end if
        put stopanimation

    end loop

end game1
if stopanimation = false then
    fork game1
end if
if stopanimation=false then
var playg : int := GUI.CreateButtonFull (282, 270, 0, "Play Game", game, 0, '^D', true)
var control : int := GUI.CreateButtonFull (287, 180, 0, "Controls", controls, 0, '^D', true)
var quitBtn : int := GUI.CreateButton (297, 100, 0, "Quit", GUI.Quit)
end if
loop
    exit when GUI.ProcessEvent
end loop






>







Please specify what version of Turing you are using

