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

Username:   Password: 
 RegisterRegister   
 Having Trouble moving circle up and down continuously
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
zunaed




PostPosted: Mon Oct 20, 2008 10:34 pm   Post subject: Having Trouble moving circle up and down continuously

I'm trying to figure out how to make a circle move up and down, so far i have

var inky:=135

loop
if inky>35 then
inky:=inky-1
elsif inky<35 then
inky:=inky+1
end if
Draw.FillOval (335, inky, 10, 10, brightcyan)
Draw.FillBox (325, 135, 345, 125, brightcyan)
end loop

I knew how to do this two years ago but haven't used it since and now I cant seem to remember the logic behind how it works. Can someone plz help
Sponsor
Sponsor
Sponsor
sponsor
gitoxa




PostPosted: Mon Oct 20, 2008 10:41 pm   Post subject: RE:Having Trouble moving circle up and down continuously

I'd use a variable for whether or not the circle is currently moving up or down. (hint: 2 choices)
zunaed




PostPosted: Mon Oct 20, 2008 10:47 pm   Post subject: Re: Having Trouble moving circle up and down continuously

YES! Just figured it out thanks for the help.
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: