Autor Beitrag
andyprog
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Mo 21.03.05 10:19 
was ist ein Boolean Schalter :?: ich benötige ihn für das spiel mühle für den weechsel zwischen zwei spieler
Jailbird
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 127

Windows XP Pro SP2
Delphi 7 Professional
BeitragVerfasst: Mo 21.03.05 10:31 
Das ist eine Boolsche Variable, welche immer ihren Wert wechselt und so anzeigt, wer dran ist :)

Bsp:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var
  PlayerOne: Boolean = True;

begin
  if PlayerOne then
    // Spieler eins am Zug
  else
    // Spieler zwei am Zug
  PlayerOne := not PlayerOne;
end;