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

Username:   Password: 
 RegisterRegister   
 need help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Bskll




PostPosted: Sun Nov 07, 2004 9:15 pm   Post subject: need help

this is my code so far
code:
var colorline : int
colorback(black)

loop
randint(colorline, 0, maxcolor)
Draw.ThickLine(0,maxy div 2, maxx, maxy div 2, 10, colorline)
delay(75)
cls
Draw.ThickLine(0,0,maxx, maxy, 10, colorline)
delay(75)
cls
Draw.ThickLine(maxx div 2, 0, maxx div 2, maxy, 10, colorline)
delay(75)
cls
Draw.ThickLine(maxx, 0, 0, maxy, 10, colorline)
delay(75)
cls
for i : 0..100
    drawoval(maxx div 2, maxy div 2, i-100, i-100, colorline)
    drawoval(maxx div 2, maxy div 2, i+100, i+100, colorline)
cls
end for
delay(100)
end loop



how do i make the circle go faster ie. make it skip 5 pixel at a time?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Nov 07, 2004 9:18 pm   Post subject: (No subject)

code:

for i:1..100 by 5
..

read more about loops here
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Bskll




PostPosted: Sun Nov 07, 2004 9:24 pm   Post subject: (No subject)

thanks
myob




PostPosted: Mon Nov 08, 2004 7:15 am   Post subject: (No subject)

tony wrote:
code:

for i:1..100 by 5
..

read more about loops here


that's interesting, never thought of that. i would go
code:
for i : 1 .. 100
radius := i * 5


just other variations, dont get too into detail, each got its ups and downs
Tony




PostPosted: Mon Nov 08, 2004 10:56 am   Post subject: (No subject)

myob - your code will go up to 500 instead of 100 Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
myob




PostPosted: Mon Nov 08, 2004 5:18 pm   Post subject: (No subject)

i know that, but since i see urs is an example, mine was just another example without deep thought, if u look on his program, his intention was to draw 100 circles. if he uses u loop he only draws 20 circles Very Happy
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  [ 6 Posts ]
Jump to:   


Style:  
Search: