unit Punkte1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

const
  FMax = 16;
  Farbe: Array[0..FMax-1] of TColor =
   (clBlack, clMaroon, clGreen, clNavy, clTeal, clPurple,
    clOlive, clGray, clSilver, clRed, clLime, clBlue,
    clAqua, clFuchsia, clYellow, clWhite);
  
var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var i,x,y,Dicke: Integer;
begin
  for i := 1 to 500 do
  begin
    x := random(ClientWidth);
    y := random(ClientHeight);
    Dicke := random(20);
    // mit Farbe gefüllte Kreise zeichnen
    Canvas.Brush.Color := Farbe[random(FMax)];
    Canvas.Ellipse (x,y,x+Dicke,y+Dicke);
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  randomize;
  Color := Farbe[random(FMax div 2)];
end;

end.
