watkins
30 Oct 05, 01:34 AM
It's a bit crude but it might give someone some inspiration.
See if you can hit the dot.
P.S. Can't see any use for this, was just playing around.
{Variable definitions}
positionx : integer;
positiony : integer;
{Module Code}
clearscreen;
textpos(100,50);
setpencolor(clblack);
drawtext('Chase The Dot');
{Set random position and draw dot}
positionx := random(630);
positiony := random(470);
ellipse(positionx,positiony,positionx+10,positiony +10);
delay(1);
{Check Position Of Pointer}
if (GetClickX >= positionx) and (getclickx <= (positionx+10)) and (GetClickY >= positiony) and (getclicky <= (positiony+10)) then
begin;
textpos(100,100);
setpencolor(clblack);
drawtext('You Did It. Click Anywhere To Start Again');
Delay(1);
waituntil(getclick);
end;
See if you can hit the dot.
P.S. Can't see any use for this, was just playing around.
{Variable definitions}
positionx : integer;
positiony : integer;
{Module Code}
clearscreen;
textpos(100,50);
setpencolor(clblack);
drawtext('Chase The Dot');
{Set random position and draw dot}
positionx := random(630);
positiony := random(470);
ellipse(positionx,positiony,positionx+10,positiony +10);
delay(1);
{Check Position Of Pointer}
if (GetClickX >= positionx) and (getclickx <= (positionx+10)) and (GetClickY >= positiony) and (getclicky <= (positiony+10)) then
begin;
textpos(100,100);
setpencolor(clblack);
drawtext('You Did It. Click Anywhere To Start Again');
Delay(1);
waituntil(getclick);
end;