% Mr. M

% December 16, 2000

% Bouncing ball example

setscreen("graphics:vga")

randomize

var cdfx,cdfy:int:=15

var x,y:int

randint(x,100,539)

randint(y,100,379)

loop

x:=x+cdfx

y:=y+cdfy

drawoval(x,y,10,10,14)

delay(10)

drawoval(x,y,10,10,0)

if x < 100 or x > 539 then

cdfx:=cdfx * -1

end if

if y < 100 or y > 379 then

cdfy:=cdfy * -1

end if

end loop

Hosted by www.Geocities.ws

1