Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.Imaging.pngimage,
- Vcl.StdCtrls;
- type
- TForm1 = class(TForm)
- Spielbrett: TImage;
- Button1: TButton;
- Label1: TLabel;
- Label2: TLabel;
- Button2: TButton;
- G1: TImage;
- G2: TImage;
- G3: TImage;
- G4: TImage;
- G13: TImage;
- G5: TImage;
- G6: TImage;
- G7: TImage;
- G8: TImage;
- G9: TImage;
- G10: TImage;
- G11: TImage;
- G12: TImage;
- G15: TImage;
- G14: TImage;
- G16: TImage;
- G17: TImage;
- G19: TImage;
- G18: TImage;
- G20: TImage;
- G21: TImage;
- G22: TImage;
- G23: TImage;
- G24: TImage;
- G25: TImage;
- G26: TImage;
- G27: TImage;
- G28: TImage;
- G29: TImage;
- G30: TImage;
- G51: TImage;
- G52: TImage;
- G54: TImage;
- G53: TImage;
- G47: TImage;
- G48: TImage;
- G31: TImage;
- G32: TImage;
- G33: TImage;
- G34: TImage;
- G38: TImage;
- G37: TImage;
- G36: TImage;
- G35: TImage;
- G42: TImage;
- G41: TImage;
- G40: TImage;
- G39: TImage;
- G50: TImage;
- G49: TImage;
- G46: TImage;
- G45: TImage;
- G44: TImage;
- G43: TImage;
- Image1: TImage;
- Button3: TButton;
- Image2: TImage;
- Image3: TImage;
- Image4: TImage;
- Label3: TLabel;
- procedure FormCreate(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure G1Click(Sender: TObject);
- procedure G2Click(Sender: TObject);
- procedure G3Click(Sender: TObject);
- procedure G4Click(Sender: TObject);
- procedure G5Click(Sender: TObject);
- procedure G6Click(Sender: TObject);
- procedure G7Click(Sender: TObject);
- procedure G8Click(Sender: TObject);
- procedure G9Click(Sender: TObject);
- procedure G10Click(Sender: TObject);
- procedure G11Click(Sender: TObject);
- procedure G12Click(Sender: TObject);
- procedure G13Click(Sender: TObject);
- procedure G14Click(Sender: TObject);
- procedure G15Click(Sender: TObject);
- procedure G16Click(Sender: TObject);
- procedure G17Click(Sender: TObject);
- procedure G18Click(Sender: TObject);
- procedure G19Click(Sender: TObject);
- procedure G20Click(Sender: TObject);
- procedure G21Click(Sender: TObject);
- procedure G22Click(Sender: TObject);
- procedure G23Click(Sender: TObject);
- procedure G24Click(Sender: TObject);
- procedure G25Click(Sender: TObject);
- procedure G26Click(Sender: TObject);
- procedure G27Click(Sender: TObject);
- procedure G28Click(Sender: TObject);
- procedure G29Click(Sender: TObject);
- procedure G30Click(Sender: TObject);
- procedure G31Click(Sender: TObject);
- procedure G32Click(Sender: TObject);
- procedure G33Click(Sender: TObject);
- procedure G34Click(Sender: TObject);
- procedure G35Click(Sender: TObject);
- procedure G36Click(Sender: TObject);
- procedure G37Click(Sender: TObject);
- procedure G38Click(Sender: TObject);
- procedure G39Click(Sender: TObject);
- procedure G40Click(Sender: TObject);
- procedure G41Click(Sender: TObject);
- procedure G42Click(Sender: TObject);
- procedure G43Click(Sender: TObject);
- procedure G44Click(Sender: TObject);
- procedure G46Click(Sender: TObject);
- procedure G45Click(Sender: TObject);
- procedure G51Click(Sender: TObject);
- procedure G52Click(Sender: TObject);
- procedure G54Click(Sender: TObject);
- procedure G53Click(Sender: TObject);
- procedure G47Click(Sender: TObject);
- procedure G50Click(Sender: TObject);
- procedure G49Click(Sender: TObject);
- procedure G48Click(Sender: TObject);
- private
- { Private-Deklarationen }
- public
- { Public-Deklarationen }
- end;
- var
- Form1: TForm1;
- feld :array[1..54] of integer;
- wuerfel,ergebnis, gergebnis :integer;
- markiert :integer;
- markiertesfeld :integer;
- implementation
- {$R *.dfm}
- procedure zeichne;
- begin
- if feld[1]=0 then form1.g1.canvas.draw(0,0,form1.image4.picture.bitmap);
- if feld[1]=1 then form1.g1.canvas.draw(0,0,form1.image1.picture.bitmap);
- if feld[1]=2 then form1.g1.canvas.draw(0,0,form1.image2.picture.bitmap);
- if feld[1]=3 then form1.g1.canvas.draw(0,0,form1.image3.picture.bitmap);
- if feld[46]=0 then form1.g46.canvas.draw(0,0,form1.image4.picture.bitmap);
- if feld[46]=1 then form1.g46.canvas.draw(0,0,form1.image1.picture.bitmap);
- if feld[46]=2 then form1.g46.canvas.draw(0,0,form1.image2.picture.bitmap);
- if feld[46]=3 then form1.g46.canvas.draw(0,0,form1.image3.picture.bitmap);
- if feld[2]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[2]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[2]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[2]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[3]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[3]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[3]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[3]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[4]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[4]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[4]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[4]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[5]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[5]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[5]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[5]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[6]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[6]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[6]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[6]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[7]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[7]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[7]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[7]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[8]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[8]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[8]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[8]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[9]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[9]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[9]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[9]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[10]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[10]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[10]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[10]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[11]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[11]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[11]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[11]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[12]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[12]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[12]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[12]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[13]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[13]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[13]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[13]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[14]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[14]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[14]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[14]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[15]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[15]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[15]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[15]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[16]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[16]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[16]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[16]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[17]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[17]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[17]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[17]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[18]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[18]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[18]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[18]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[19]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[19]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[19]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[19]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[20]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[20]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[20]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[20]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[21]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[21]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[21]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[21]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[22]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[22]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[22]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[22]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[23]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[23]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[23]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[23]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[24]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[24]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[24]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[24]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[25]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[25]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[25]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[25]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[26]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[26]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[26]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[26]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[27]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[27]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[27]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[27]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[28]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[28]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[28]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[28]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[29]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[29]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[29]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[29]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[30]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[30]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[30]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[30]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[31]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[31]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[31]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[31]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[32]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[32]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[32]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[32]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[33]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[33]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[33]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[33]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[34]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[34]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[34]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[34]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[35]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[35]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[35]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[35]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[36]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[36]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[36]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[36]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[37]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[37]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[37]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[37]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[38]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[38]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[38]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[38]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[39]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[39]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[39]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[39]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[40]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[40]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[40]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[40]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[41]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[41]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[41]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[41]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[42]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[42]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[42]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[42]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[43]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[43]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[43]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[43]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[44]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[44]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[44]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[44]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[45]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[45]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[45]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[45]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[46]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[46]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[46]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[46]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[47]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[47]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[47]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[47]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[48]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[48]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[48]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[48]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[49]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[49]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[49]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[49]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[50]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[50]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[50]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[50]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[51]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[51]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[51]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[51]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[52]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[52]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[52]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[52]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[53]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[53]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[53]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[53]=3 then form1.g1.picture:=form1.image1.picture;
- if feld[54]=0 then form1.g1.picture.bitmap:=form1.image4.picture.bitmap;
- if feld[54]=1 then form1.g1.picture:=form1.image1.picture;
- // if feld[54]=2 then form1.g1.picture:=form1.image1.picture;
- // if feld[54]=3 then form1.g1.picture:=form1.image1.picture;
- end;
- procedure klick(platz :integer);
- begin
- if markiert=0 then
- begin
- markiert:=feld[platz];
- if markiert<>0 then markiertesfeld:=platz;
- end
- else
- begin
- feld[platz]:=markiert;
- feld[markiertesfeld]:=0;
- form1.label3.caption:='neuer Platz: '+inttostr(platz)+', alter Platz: '+inttostr(markiertesfeld)+', Fiugur: '+inttostr(markiert);
- markiert:=0;
- markiertesfeld:=0;
- zeichne;
- end;
- end;
- procedure neuesspiel;
- var i :integer;
- begin
- for i:=1 to 43 do feld[i]:=0;
- feld[44]:=1;
- feld[45]:=1;
- feld[46]:=1;
- feld[47]:=1;
- feld[48]:=2;
- feld[49]:=2;
- feld[49]:=2;
- feld[50]:=2;
- feld[51]:=3;
- feld[52]:=3;
- feld[53]:=3;
- feld[54]:=3;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- ergebnis:=random(6)+1;
- label1.caption:= inttostr(ergebnis);
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- var
- gwuerfel :integer;
- begin
- gwuerfel:=random(100)+1;
- if gwuerfel<=5 then gergebnis:=10;
- if (gwuerfel>=6) and (gwuerfel<=10) then gergebnis:=9;
- if (gwuerfel>=11) and (gwuerfel<=15) then gergebnis:=8;
- if (gwuerfel>=16) and (gwuerfel<=25) then gergebnis:=7;
- if (gwuerfel>=26) and (gwuerfel<=45) then gergebnis:=-6;
- if (gwuerfel>=46) and (gwuerfel<=55) then gergebnis:=-5;
- if (gwuerfel>=56) and (gwuerfel<=65) then gergebnis:=-4;
- if (gwuerfel>=66) and (gwuerfel<=75) then gergebnis:=-3;
- if (gwuerfel>=76) and (gwuerfel<=80) then gergebnis:=-2;
- if (gwuerfel>=81) and (gwuerfel<=100) then gergebnis:=-1;
- label2.caption:= inttostr (gergebnis);
- end;
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- randomize;
- neuesspiel;
- end;
- procedure TForm1.G1Click(Sender: TObject);
- begin
- form1.label3.caption:='Klick auf G1.';
- klick(1);
- end;
- procedure TForm1.G2Click(Sender: TObject);
- begin
- klick(2);
- end;
- procedure TForm1.G3Click(Sender: TObject);
- begin
- klick(3);
- end;
- procedure TForm1.G4Click(Sender: TObject);
- begin
- klick(4);
- end;
- procedure TForm1.G5Click(Sender: TObject);
- begin
- klick(5);
- end;
- procedure TForm1.G6Click(Sender: TObject);
- begin
- klick(6);
- end;
- procedure TForm1.G7Click(Sender: TObject);
- begin
- klick(7);
- end;
- procedure TForm1.G8Click(Sender: TObject);
- begin
- klick(8);
- end;
- procedure TForm1.G9Click(Sender: TObject);
- begin
- klick(9);
- end;
- procedure TForm1.G10Click(Sender: TObject);
- begin
- klick(10);
- end;
- procedure TForm1.G11Click(Sender: TObject);
- begin
- klick(11);
- end;
- procedure TForm1.G12Click(Sender: TObject);
- begin
- klick(12);
- end;
- procedure TForm1.G13Click(Sender: TObject);
- begin
- klick(13);
- end;
- procedure TForm1.G14Click(Sender: TObject);
- begin
- klick(14);
- end;
- procedure TForm1.G15Click(Sender: TObject);
- begin
- klick(15);
- end;
- procedure TForm1.G16Click(Sender: TObject);
- begin
- klick(16);
- end;
- procedure TForm1.G17Click(Sender: TObject);
- begin
- klick(17);
- end;
- procedure TForm1.G18Click(Sender: TObject);
- begin
- klick(18);
- end;
- procedure TForm1.G19Click(Sender: TObject);
- begin
- klick(19);
- end;
- procedure TForm1.G20Click(Sender: TObject);
- begin
- klick(20);
- end;
- procedure TForm1.G21Click(Sender: TObject);
- begin
- klick(21);
- end;
- procedure TForm1.G22Click(Sender: TObject);
- begin
- klick(22);
- end;
- procedure TForm1.G23Click(Sender: TObject);
- begin
- klick(23);
- end;
- procedure TForm1.G24Click(Sender: TObject);
- begin
- klick(24);
- end;
- procedure TForm1.G25Click(Sender: TObject);
- begin
- klick(25);
- end;
- procedure TForm1.G26Click(Sender: TObject);
- begin
- klick(26);
- end;
- procedure TForm1.G27Click(Sender: TObject);
- begin
- klick(27);
- end;
- procedure TForm1.G28Click(Sender: TObject);
- begin
- klick(28);
- end;
- procedure TForm1.G29Click(Sender: TObject);
- begin
- klick(29);
- end;
- procedure TForm1.G30Click(Sender: TObject);
- begin
- klick(30);
- end;
- procedure TForm1.G31Click(Sender: TObject);
- begin
- klick(31);
- end;
- procedure TForm1.G32Click(Sender: TObject);
- begin
- klick(32);
- end;
- procedure TForm1.G33Click(Sender: TObject);
- begin
- klick(33);
- end;
- procedure TForm1.G34Click(Sender: TObject);
- begin
- klick(34);
- end;
- procedure TForm1.G35Click(Sender: TObject);
- begin
- klick(35);
- end;
- procedure TForm1.G36Click(Sender: TObject);
- begin
- klick(36);
- end;
- procedure TForm1.G37Click(Sender: TObject);
- begin
- klick(37);
- end;
- procedure TForm1.G38Click(Sender: TObject);
- begin
- klick(38);
- end;
- procedure TForm1.G39Click(Sender: TObject);
- begin
- klick(39);
- end;
- procedure TForm1.G40Click(Sender: TObject);
- begin
- klick(40);
- end;
- procedure TForm1.G41Click(Sender: TObject);
- begin
- klick(41);
- end;
- procedure TForm1.G42Click(Sender: TObject);
- begin
- klick(42);
- end;
- procedure TForm1.G43Click(Sender: TObject);
- begin
- klick(43);
- end;
- procedure TForm1.G44Click(Sender: TObject);
- begin
- klick(44);
- end;
- procedure TForm1.G45Click(Sender: TObject);
- begin
- klick(45);
- end;
- procedure TForm1.G46Click(Sender: TObject);
- begin
- form1.label3.caption:='Klick auf G46.';
- klick(46);
- end;
- procedure TForm1.G47Click(Sender: TObject);
- begin
- klick(47);
- end;
- procedure TForm1.G48Click(Sender: TObject);
- begin
- klick(48);
- end;
- procedure TForm1.G49Click(Sender: TObject);
- begin
- klick(49);
- end;
- procedure TForm1.G50Click(Sender: TObject);
- begin
- klick(50);
- end;
- procedure TForm1.G51Click(Sender: TObject);
- begin
- klick(51);
- end;
- procedure TForm1.G52Click(Sender: TObject);
- begin
- klick(52);
- end;
- procedure TForm1.G53Click(Sender: TObject);
- begin
- klick(53);
- end;
- procedure TForm1.G54Click(Sender: TObject);
- begin
- klick(54);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement