Skip to content

Instantly share code, notes, and snippets.

@simonszu
Created November 1, 2013 10:30
Show Gist options
  • Save simonszu/7263572 to your computer and use it in GitHub Desktop.
Save simonszu/7263572 to your computer and use it in GitHub Desktop.
PROGRAM Grafik0;
USES Graph;
VAR Treiber, Modus, Zeile, Spalte, Farbe, Zufall, counter: Integer;
BEGIN
Randomize;
counter := 0;
Treiber := Detect;
InitGraph (Treiber, Modus, 'c:\turbo\bgi');
repeat
for zeile := 1 to 480 do begin
for spalte := 1 to 640 do begin
zufall := random (2) + 1;
if (zufall = 1) then farbe := random(15) + 1
else farbe := random (15) + 1;
putpixel (spalte, zeile, farbe);
end;
end;
inc(counter);
until counter > 10;
{ hier stehen deine Grafikanweisungen }
Readln;
END.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment