
-----------------------------------
DeTrueMan
Fri Jan 19, 2018 9:21 am

Turing Painting and song Game
-----------------------------------
 HI, I just created a CompSci.ca account and I was wondering if this group could help me with a program I'm tying to make on Turing. (I am very much a beginner)
It is a game where you simulate retirement by painting a wall in random shapes and colors. you might also recognize some of the code. :lol: you guys have already been such a help. 
here it is;

-------------------------------start of code-------------------------------------
setscreen ("graphics;640;480,nocursor,offscreenonly")
var move : string (1)
var x, dx, dy, y, c, x2, y2, s : int
x := 100
y := 300
dx := 0
dy := 0
var playagain : string (1)
put "welcome to retirement simulator"
put "your job is to paint the walls"
put " Use the aroow keys to paint"
put "enter y to reset when you have won the game"
process playstuff
    loop 
    Music.Play ("8>def+f+edadef+f+edgef+gdc+c+ef+ggf+ef+def+c+def+ag+f+g+ef+g+dc+c+deedc+dc+dc+ddc+c+c+c+ed+c+d+c+d+dc+c+d") 
    Music.Play ("dc+g+e+f+g+c+bag+af+g+ac+ed+c+d+f+gaagf+gef+gdccd+ef+cef+gdc+c+ef+ggf+ef+def+cc+c+edc+") 
    Music.Play ("dc+dcddc ccccd ccccdc+ c+c+cdc+dfed c+c+def+agf+") 
    Music.Play ("gc+degf+ef+c+df+edc+defc+edc+db-agfedc+dfedbg+ab fdefc+de fc+dedc+1d6c+cdefedc+ceg2b-p 6dfg+2bp 6d 62c 4cccd 2f 4ddd 2e 4d-d+-d#d 2e 4eefg2a 4aagf2a4a2e 4e 2d4de2f 4ed") 
    Music.Play ("2c4cd2e 4dc -d2-e 2#e 2e4") 
    Music.Play ("-d#d2e 4eef 2a 4aagf2a4a2e 4e 2d4de2f 4ed") 
    Music.Play ("2c4cd2e 4dc -d2-e 2#e 2e4") 
    View.Update
    end loop
end playstuff

fork playstuff
loop
    randint (c, 3, 255)
    randint (x2, 11, 31)
    randint (y2, 11, 31)
    x := x + dx
    y := y + dy
    drawfilloval (x, y, x2, y2, c)
    View.Update
    getch (move)
    if move = KEY_DOWN_ARROW
            then
        dy := -3
        dx := 0
    elsif move = KEY_UP_ARROW
            then
        dy := 3
        dx := 0
    elsif move = KEY_RIGHT_ARROW
            then
        dx := 3
        dy := 0
    elsif move = KEY_LEFT_ARROW
            then
        dx := -3
        dy := 0
    end if
    getch (playagain)

    if playagain = "y" then
        cls
        put "congratulations!!!"
        drawbox (30, 30, 100, 100, black)
drawbox (50, 30, 80, 60, brightred)
drawbox (35, 70, 55, 90, green)
drawline (45, 70, 45, 90, green)
drawline (35, 80, 55, 80, green)
drawbox (75, 70, 95, 90, green)
drawline (85, 70, 85, 90, green)
drawline (75, 80, 95, 80, green)
drawline (30, 100, 65, 135, brightblue)
drawline (65, 135, 100, 100, brightblue)
drawline (90, 110, 90, 150, black)
drawline (75, 125, 75, 150, black)
drawline (75, 150, 90, 150, black)
locate (maxrow, 2)
put "Home sweet home" ..
        delay (13000)
        cls
        put "welcome to retirement simulator"
        put "your job is to paint the walls"
        put "enter y to reset when you have won the game"
        x := 100
y := 300
    end if
end loop
---------------------------------------end of code--------------------------------------------------

I you guys have any suggestions please fell free to help. or just enjoy the game.[/b]

-----------------------------------
TokenHerbz
Sat Jan 20, 2018 2:56 am

RE:Turing Painting and song Game
-----------------------------------
i cant move diangley (NW) for example.  suggestion easy fix to create that ability.

-----------------------------------
DeTrueMan
Sun Jan 21, 2018 1:59 pm

RE:Turing Painting and song Game
-----------------------------------
TokenHerbz-
I currently do not know how to do that. but, do you have any other suggestions for me?
DeTrueMan
