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

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




PostPosted: Sun Jan 09, 2005 4:31 pm   Post subject: Snow Falls

var snowx, snowy, velx, vely : array 1 .. 75 of int

for i : 1 .. 75
snowx (i) := Rand.Int (0, maxx + 400)
snowy (i) := Rand.Int (0, maxy)
velx (i) := Rand.Int (2, 4)
end for

loop
for i : 1 .. 75
drawfilloval (snowx (i), snowy (i), velx (i) div 2, velx (i) div 2, 0)
snowx (i) -= velx (i)
snowy (i) -= 4

if snowy (i) < 0 or snowx (i) < 0 then
snowx (i) := Rand.Int (0, maxx + 400)
snowy (i) := maxy
end if
end for
View.Update
delay (40)
cls
end loop



What does each line do? I dont get some of the code.
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sun Jan 09, 2005 6:11 pm   Post subject: (No subject)

1.)
code:
[code][/code] tags please :)

2.)
What part of the code don't you get? Are you unfamiliar with any of the syntax?
AsianSensation




PostPosted: Tue Jan 11, 2005 8:25 pm   Post subject: Re: Snow Falls

Inferno wrote:
What does each line do? I dont get some of the code.


Sounds kinda suspicious.......

http://www.compsci.ca/v2/viewtopic.php?t=4097&highlight=snow

What do you plan to do with this piece of code?
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: