15.02.2012, 16:19
|
Так проходящий
|
|
Регистрация: 18.07.2011
Сообщения: 805
Версия Delphi: 7Lite
Репутация: 6063
|
|
лабиринт для этой проги...
PHP код:
function rand(chance: byte = 40): Boolean;
begin
result := random(100) < chance;
end;
procedure TForm1.Button2Click(Sender: TObject);
var i, j, step, x, y: Integer;
begin
Button4.Click;
step := StrToInt(Edit1.Text)*4;
for i := 0 to (ClientWidth - 1) div step do
for j := 0 to (ClientHeight - 1) div step do
begin
x := i*step;
y := j*step;
if rand then
begin
FormMouseDown(nil, mbLeft, [ssLeft], x, y);
FormMouseUp(nil, mbLeft, [ssLeft], x+step, y);
end;
if rand then
begin
FormMouseDown(nil, mbLeft, [ssLeft], x, y);
FormMouseUp(nil, mbLeft, [ssLeft], x, y+step);
end;
end;
Button4.Click;
Button6.Click;
GroupBox1.Hide;
end;
|