Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#8

AW: Ressourcen pro Sekunde generieren

  Alt 27. Jan 2017, 10:59
... wieso berechnest Du nicht erst die Werte und gibst sie dann aus?

Delphi-Quellcode:
  repeat
      begin
      Luxusgueter:=Luxusgueter+Luxusgueterproduktion;
      Stein:=Stein+Steinproduktion;
      Nahrung:=Nahrung+Nahrungproduktion;
      Gold:=Gold+Goldproduktion;
      label13.caption:=floattostrf(Stein,fffixed,10,0);
      label14.caption:=floattostrf(luxusgueter,fffixed,10,0);
      label15.caption:=floattostrf(Nahrung,fffixed,10,0);
      label16.caption:=floattostrf(gold,fffixed,10,0);
      label17.caption:=inttostr(einwohner);
      i:=i+1;
      end;
  until i=100000000;
Das kann doch keiner am Bildschirmverfolgen..

Delphi-Quellcode:
  repeat
    begin
      Luxusgueter:=Luxusgueter+Luxusgueterproduktion;
      Stein:=Stein+Steinproduktion;
      Nahrung:=Nahrung+Nahrungproduktion;
      Gold:=Gold+Goldproduktion;
      i := i+1;
    end;
  until i = 100000000;
  label13.caption:=floattostrf(Stein,fffixed,10,0);
  label14.caption:=floattostrf(luxusgueter,fffixed,10,0);
  label15.caption:=floattostrf(Nahrung,fffixed,10,0);
  label16.caption:=floattostrf(gold,fffixed,10,0);
  label17.caption:=inttostr(einwohner);
und eigentlich könnte man das dann auch ohne Schleife bereichnen.

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat