AddText "Use arrows to move around"
'first generate two random sized circles
radius1=Rand(20,60)
radius2=Rand(20,60)
Repeat
'update controls
If LeftKey()Then x=x-1
If RightKey()Then x=x+1
If UpKey()Then y=y-1
If DownKey()Then y=y+1
'circle 1 (movable)
Circle x-radius1,y-radius1,radius1*2,OFF
'circle 2 (static)
Circle 260-radius2,180-radius2,radius2*2,OFF
Text 20,20,"Overlapping: "+(Distance(x,y,260,180)<(radius1+radius2))
DrawScreen
Until EscapeKey()
|
|