Here is an animated Christmas card.

Code: Select all

`'Software Chirstmas card by Shawn Grieb, 2009`

'snowfall:

'100 normal

'300 heavy

'1000 blizzard

const snowfall = 100

screen 13

line(0,185)-(319,199),6,BF

circle(160,170),20,15,,,,F

circle(160,140),15,15,,,,F

circle(160,120),10,15,,,,F

circle(156,116),2,0,,,,F

circle(164,116),2,0,,,,F

circle(160,120),2,4,,,,F

dim x(0 to snowfall) as integer

dim y(0 to snowfall) as integer

dim i as integer

for i = 0 to snowfall

x(i) = 319*rnd

y(i) = 100*rnd

next i

dim as integer newx, newy

do

sleep 10

for i = 0 to snowfall

newx = x(i) + int(3 * rnd - 1)

newy = y(i) + 1

if point(newx,newy) = 0 or point(newx,newy) = 7 then

pset(x(i),y(i)), 0

pset(newx,newy), 7

x(i) = newx

y(i) = newy

else

pset(x(i),y(i)), 15

x(i) = 319 * rnd

y(i) = 0

end if

next i

loop until inkey <> ""