var WinID := Window.Open ("graphics:max;max")
var r,r2:=0
var mx,my,mb:int
var x,y,x2,y2,cc,c:int
var key:array char of boolean
colourback(9)
cls
x:=maxx div 2
y:=maxy div 2
x2:=maxx div 2
y2:=maxy div 2
loop
cc:=Rand.Int (1,10)
if cc=1 then c:=7
elsif cc=2 then c:=67
elsif cc=3 then c:=98
elsif cc=4 then c:=15
elsif cc=5 then c:=27
elsif cc=6 then c:=57
elsif cc=7 then c:=98
elsif cc=8 then c:=200
elsif cc=9 then c:=180
elsif cc=10 then c:=120
end if
Input.KeyDown (key)
drawoval (x,y,r,r,c)
r:=r+5
delay (100)
if key(KEY_RIGHT_ARROW)
then x:=x+10
end if
if key(KEY_LEFT_ARROW)
then x:=x-10
end if
if key (KEY_UP_ARROW)
then y:=y+10
end if
if key (KEY_DOWN_ARROW)
then y:=y-10
end if
end loop
|