AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Galgenmännchen

Offene Frage von "Tomislav"
Ein Thema von Tomislav · begonnen am 1. Dez 2005 · letzter Beitrag vom 3. Dez 2005
Antwort Antwort
Tomislav

Registriert seit: 1. Dez 2005
34 Beiträge
 
#1

Re: Galgenmännchen

  Alt 3. Dez 2005, 10:33
Delphi-Quellcode:
procedure TForm1.Spieler1(Sender: TObject);
begin
 if
 (RBP1.Checked = true) and (lblString1.Caption = A) and (lblString2.Caption = B) and (lblString3.Caption = C) and (lblString4.Caption = D) and (lblString5.Caption = E) and (lblString6.Caption = F) and (lblString7.Caption = G) and (lblString8.Caption = H) and (lblString9.Caption = I) and (lblString10.Caption = J) and (lblString11.Caption = K) and (lblString12.Caption = L)
 then
 begin
 Application.MessageBox('Spieler 1 hat gewonnen!','Gewinner');
 btnWortwahlClick(Sender);
 end;

 if
 (Antwort = A) or (Antwort = B) or (Antwort = C) or (Antwort = D) or (Antwort = E) or (Antwort = F) or (Antwort = G) or (Antwort = H) or (Antwort = I) or (Antwort = J) or (Antwort = K) or (Antwort = L)
 then
 begin
 end
 else
 begin
 RBP1.Checked := false;
 RBP2.Checked := true;
 Application.MessageBox('Leider ist dieser Buchstabe nicht dabei! Spieler 2 ist an der Reihe!','!!!');
 aa := StrToInt(lblFehler1.Caption);
 aa := aa+1;
 lblFehler1.Caption := IntToStr(aa);
 end;
end;

procedure TForm1.Spieler2(Sender: TObject);
begin
 if
 (RBP2.Checked = true) and (lblString1.Caption = A) and (lblString2.Caption = B) and (lblString3.Caption = C) and (lblString4.Caption = D) and (lblString5.Caption = E) and (lblString6.Caption = F) and (lblString7.Caption = G) and (lblString8.Caption = H) and (lblString9.Caption = I) and (lblString10.Caption = J) and (lblString11.Caption = K) and (lblString12.Caption = L)
 then
 begin
 Application.MessageBox('Spieler 2 hat gewonnen!','Gewinner');
 btnWortwahlClick(Sender);
 end;

 if
 (Antwort = A) or (Antwort = B) or (Antwort = C) or (Antwort = D) or (Antwort = E) or (Antwort = F) or (Antwort = G) or (Antwort = H) or (Antwort = I) or (Antwort = J) or (Antwort = K) or (Antwort = L)
 then
 begin
 end
 else
 begin
 RBP2.Checked := false;
 RBP1.Checked := true;
 Application.MessageBox('Leider ist dieser Buchstabe nicht dabei! Spieler 1 ist an der Reihe!','!!!');
 bb := StrToInt(lblFehler2.Caption);
 bb := bb+1;
 lblFehler2.Caption := IntToStr(bb);
 end;

end;

procedure TForm1.PBP2OnPaint(Sender: TObject);
begin

 if
 (lblFehler2.Caption = '0')
 then
  begin
   with PBP2.canvas do
    begin
    x.x := 5;
    x.y := 65;
    y.x := 65;
    y.y := x.y;
    moveto(x.x, x.y);
    lineto(y.x, y.y);
    end;
  end;


 if
 (lblFehler2.Caption = '1')
 then
  begin
   with PBP2.canvas do
    begin
    x.x := 5;
    x.y := 65;
    y.x := 65;
    y.y := x.y;
    xx1.x := 20;
    xx1.y := x.y;
    xx2.x := 20;
    xx2.y := 10;
    moveto(x.x, x.y);
    lineto(y.x, y.y);
    moveto(xx1.x, xx1.y);
    lineto(xx2.x, xx2.y);
    end;
  end;
end;

procedure TForm1.PBP1OnPaint(Sender: TObject);
begin
  if
 (lblFehler1.Caption = '0')
 then
  begin
   with PBP1.canvas do
    begin
    x.x := 5;
    x.y := 65;
    y.x := 65;
    y.y := x.y;
    moveto(x.x, x.y);
    lineto(y.x, y.y);
    end;
  end;

 if
 (lblFehler1.Caption = '1')
 then
 begin
   with PBP1.canvas do
    begin
    x.x := 5;
    x.y := 65;
    y.x := 65;
    y.y := x.y;
    xx1.x := 20;
    xx1.y := x.y;
    xx2.x := 20;
    xx2.y := 10;
    moveto(x.x, x.y);
    lineto(y.x, y.y);
    moveto(xx1.x, xx1.y);
    lineto(xx2.x, xx2.y);
    end;
 end;
end;

end.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:35 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz