unit unit1;

{$mode objfpc}{$H+}

interface

uses
  // Math nötig für Funktion RoundTo
  // LCLType nötig für MessageBox
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  ExtCtrls, ComCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Image1: TImage;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);

  private

  public

  end;

var
  Form1: TForm1;
Const
  StatischerWert = 16.666;
implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var Zahl: Integer;
begin
    Randomize;
    Zahl:= Random(6) + 1;
    // if Zahl = 1 then Image1.Picture.LoadFromFile('1.png');
    // if Zahl = 2 then Image1.Picture.LoadFromFile('2.png');
    // if Zahl = 3 then Image1.Picture.LoadFromFile('3.png');
    // if Zahl = 4 then Image1.Picture.LoadFromFile('4.png');
    // if Zahl = 5 then Image1.Picture.LoadFromFile('5.png');
    // if Zahl = 6 then Image1.Picture.LoadFromFile('6.png');
    case Zahl of
         1: Image1.Picture.LoadFromFile('1.png');
         2: Image1.Picture.LoadFromFile('2.png');
         3: Image1.Picture.LoadFromFile('3.png');
         4: Image1.Picture.LoadFromFile('4.png');
         5: Image1.Picture.LoadFromFile('5.png');
         6: Image1.Picture.LoadFromFile('6.png');
    end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Application.Terminate;
end;



end.

