Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing Painting and song Game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DeTrueMan




PostPosted: Fri Jan 19, 2018 9:21 am   Post subject: 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. Laughing you guys have already been such a help.
here it is;

-------------------------------start of code-------------------------------------
Quote:
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<d>>def+f+edadef+f+edgef+gdc+c+ef+ggf+ef+def+c+<bab>def+ag+f+g+ef+g+dc+<ba>c+de<f+>edc+dc+d<f+ag+f+g+b>c+d<e>dc+c+<ab>c+<egf+ef+ab>c+<f+>ed+c+d+c+d+<f+agf+egabc+>dc+<ba+ef+gc+gf+edb>c+d<f+ag+f+>")
Music.Play ("<e+g+abe+>dc+g+e+f+g+c+bag+af+g+ac+ed+c+d+f+gaagf+gef+gdccd+ef+
c<ba><g>ef+gdc+c+ef+ggf+ef+def+c<babgabc+bagf+def+c<bab>def+ag+f+g+ef+g+dc<ba>cdegf+ed+<ab>c<f+>c<bag>ef+gdc+<a+>c+de<a+>gf+e>c+<a+b>c+<f+>edc+")
Music.Play ("dc+d<f+ag+f+g+b>cd<e>dc c<ab>c<egf+ef+ab>c<d>c<ba bgabdbag>d<gabdbag> c<ab>c<egf+ef+ab>c<d>c<ba bgabdf+edegabe>dc+ c+<ab>c+<egf+edf+gaagf+ gef+gdc+c+ef+g
gf+ef+def+f+edaf+gad>c<babgabdbag>dc+d<g+>fed c+<ab>c+<egf+ea>def+agf+")
Music.Play ("gc+de
gf+ef+c+d<g+>f+edc+<gab-egfef>defc+edc+db-agfedc+dfedbg+ab fdef<bg+abef+g+ab>c+de fc+d<ab-g>e<gaf>d<fge>c+<e 6<dfg+b>dfg+b>1d6c+<bag+f+ef+g+ab>cdefedc+<bag+f+ed cegb->ceg2b-p 6<dfg+b>dfg+2bp 6<<ea>ea1>d 6<<g1 6a>ec+1c+ 6<<df+a>f+a>1d")
Music.Play ("2a 4afa 2a 4gab >2c 4cccd 2f 4ddd 2e 4d-d+ Music.Play ("ab>-d#d 2e 4eefg2a 4aagf2a4a2e 4e 2d4de2f 4ed")
Music.Play ("2c4cd2e 4dc <2b4b>-d2-e 2#e 2e4")
Music.Play ("<#4fff 1-a 2ae4eaab>-d#d2e 4eef 2a 4aagf2a4a2e 4e 2d4de2f 4ed")
Music.Play ("2c4cd2e 4dc <2b4b>-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]
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: Sat Jan 20, 2018 2:56 am   Post subject: RE:Turing Painting and song Game

i cant move diangley (NW) for example. suggestion easy fix to create that ability.
DeTrueMan




PostPosted: Sun Jan 21, 2018 1:59 pm   Post subject: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: