macintosh_cookbook/examples/random.pas
2020-05-07 18:47:11 +09:00

22 lines
380 B
ObjectPascal

program ExampleRandom;
var
x, ps, start1, start2, endpt1, endpt2: Integer;
begin
ShowDrawing;
for x := 1 to 20 do
begin
ps := Random mod 10;
start1 := Random mod 200;
start2 := Random mod 200;
endpt1 := Random mod 200;
endpt2 := Random mod 200;
PenSize(ps, ps);
Moveto(start1 + 200, start2 + 100);
Lineto(endpt1 + 200, endpt2 + 100);
end
end.