![]() |
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
|
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Zitat:
Oder steh ich grad aufm Schlauch? :gruebel: Zitat:
|
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Was ich meinte: der eine Spieler wurde korrekt gezählt, der andere nicht. Das lag eben am fehlenden begin und end. Das ein exit am Ende einer Routine wenig Sinn macht und daher eine umgekehrte Reihenfolge besser ist sehe sogar ich ein :lol:
|
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Die du vorgeschlagen hast....
Delphi-Quellcode:
procedure TForm1.CountClick;
begin if CheckForWin(GBuffer) then begin Exit; end; if GPlayer = 1 then begin i := i +1; Label14.Caption := IntToStr(i); end else j := j +1; Label13.Caption := IntToStr(j); end; |
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Und Label13.Caption stimmt? Kann ja irgendwie nicht sein.
|
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Achtung!
Delphi-Quellcode:
=
if CheckForWin(GBuffer) then
begin Exit; end; if GPlayer = 1 then begin i := i +1; Label14.Caption := IntToStr(i); end else j := j +1; Label13.Caption := IntToStr(j);
Delphi-Quellcode:
if CheckForWin(GBuffer) then
begin Exit; end; if GPlayer = 1 then begin i := i +1; Label14.Caption := IntToStr(i); end else j := j +1; Label13.Caption := IntToStr(j); // nicht mehr im ELSE (!) |
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Und es fehlt immernoch das Begin und End :D
Delphi-Quellcode:
@Neutral: Darauf hamm wir schon des öfteren hingewiesen
procedure TForm1.CountClick;
begin if CheckForWin(GBuffer) then begin Exit; end; if GPlayer = 1 then begin i := i +1; Label14.Caption := IntToStr(i); end else BEGIN // hier j := j +1; Label13.Caption := IntToStr(j); END // und hier end; |
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Ach mensch hab übersehen dass er mir den gewinner jetzt nicht mehr anzeigt... aber sonst isses schonmal richtig... also er hört ja jetzt koplett dann auf zu zählen wenn jemand gewonnen hat
|
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Langsam komme ich mir veralbert vor :roll:
|
AW: tic tac toe.... mal wieder:) versteh aufgabestellung nicht ganz
Wieso?
Das klappt doch jetzt... Nur dass ich jetzt nochmal was nachsehen muss. und dass er den gewinner nicht mehr anzeigt hatte ja nichts mit dem Begin und End zu tun. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:30 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