Computer Science Canada

Snow Falls

Author:  Inferno [ 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.

Author:  Cervantes [ Sun Jan 09, 2005 6:11 pm ]
Post 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?

Author:  AsianSensation [ 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?


: