
-----------------------------------
Shippuo23
Tue Apr 07, 2009 12:59 pm

Turing help
-----------------------------------
I need help in putting a picture on to turing if you could put me in the right direction that would help

Here is my program

loop
    locatexy (50, 75)
    put "Do you want to play this Game?(y or n):" ..
    var reply : string
    get reply
    if reply = "n" then
        exit
    elsif reply = "y" then
        cls
        locatexy (50, 75)
    end if
    put "Choose your difficulty(Easy, Moderate, Hard):" ..
    var reply2 : string
    get reply2
    cls
    exit when reply2 not= "yes"
    var Easy : string
    var Moderate : string
    var Hard : string
end loop

procedure ghost
    var ghost : int := Pic.FileNew ("ghost.jpg")
    var x : 300 .. 800
    var y : 200 .. 600
    ghost := Pic.New (50, 50, 150, 150)
    for i : 1 .. 50
        x := Rand.Int (0, maxx)         % Random x?
        y := Rand.Int (0, maxy)         % Random y?
        Pic.Draw (ghost, 250, (maxx - y), 0)
        delay (5)
        cls
    end for
end ghost


Mod Edit: Remember to use syntax tags! Thanks :) Code Here

-----------------------------------
saltpro15
Tue Apr 07, 2009 1:03 pm

RE:Turing help
-----------------------------------
first, please use syntax tags
 [/code]

second, what you are doing is drawing a picture of a ghost in a random spot on the screen 50 times, if you want to do it once, get rid of the for loop and change your Pic.Draw parameters

hope this helped :)
