setscreen ("offscreenonly;graphics:1200;800;position:center;center;nobuttonbar;nocursor")
var x, y, b : int
var score : int := 0
type people :
record
x : int
y : int
col : int
end record
var bodies : array 1 .. 60 of people
for i : 1 .. 60
randint (bodies (i).x, 1, 900)
randint (bodies (i).y, 400, 800)
randint (bodies (i).col, 1, 99)
end for
loop
mousewhere (x, y, b)
colorback (100)
cls
for i : 1 .. 60
drawfillarc (bodies (i).x, bodies (i).y, 30, 30, 34, 7, bodies (i).col)
bodies (i).y -= 1
if bodies (i).y < 78 then
bodies (i).y += 3
bodies (i).x += 3
end if
if bodies (i).x > 900 then
bodies (i).y -= 3
end if
if bodies (i).y < -10 then
randint (bodies (i).x, 1, 900)
randint (bodies (i).y, 400, 800)
end if
if whatdotcolor (x, y) = bodies (i).col and b = 1 then
randint (bodies (i).x, 1, 1200)
randint (bodies (i).y, 400, 800)
score += 1
end if
buttonchoose ("multibutton")
var x2, y2, button, left, middle, right : int
mousewhere (x2, y2, button)
left := button mod 10
middle := (button - left) mod 100
right := button - middle - left
if right = 100 then
randint (bodies (i).col, 1, 255)
end if
end for
locate (1, 1)
put "Score ", score ..
drawfillbox (0, 0, 900, 50, blue)
drawline (1200, -50, 900, 50, 7)
View.Update
end loop
|