; Types: lots of things, each with its own details Graphics 640, 480 SetBuffer BackBuffer() ; what every snowflake knows about itself Type Flake Field x#, y# Field speed# Field size End Type While Not KeyHit(1) ; a new flake or two every frame For n = 1 To 2 f.Flake = New Flake f\x = Rand(0, 639) f\y = -5 f\speed = Rnd(1, 3) f\size = Rand(2, 5) Next ; move every flake, and get rid of the ones that have left the screen For f.Flake = Each Flake f\y = f\y + f\speed f\x = f\x + Sin(f\y * 2) ; drift from side to side If f\y > 480 Then Delete f Next Cls Color 255, 255, 255 count = 0 For f.Flake = Each Flake Oval f\x, f\y, f\size, f\size count = count + 1 Next Text 10, 10, count + " snowflakes. Escape quits." Flip Wend End