Chaosforge Forum

General => Off Topic => Topic started by: Shoop da Whoop on January 02, 2010, 16:09

Title: Feel the Power of Random!
Post by: Shoop da Whoop on January 02, 2010, 16:09
Just run this:

Code: [Select]
program mtrx;
uses CRT;
var x, y: shortint;

procedure thr_x;
begin
  x:=trunc(Random*79.79);
end;

procedure thr_y;
begin
  y:=trunc(Random*25.25);
end;

procedure rnbw;
begin
  TextColor(trunc(Random*15.15));
end;

BEGIN
  ClrScr;
  Randomize;
  x:=1;
  y:=1;
  repeat
    thr_x;
    thr_y;
    rnbw;
    gotoxy(x, y);
    write(round(Random*10))
  until KeyPressed;
END.

in Pascal compiler.
Title: Re: Feel the Power of Random!
Post by: ZZ on January 08, 2010, 05:43
Feel the stronger and easier power:
uses crt;
begin
 repeat
  gotoxy(random(80)+1,random(24)+1);
  textcolor(random(31));
  textbackground(random(8));
  write(chr(random(256-7)+8));
 until keypressed
end.

In Pascal Compiler too, run in fullscreen, it's better in it.
Title: Re: Feel the Power of Random!
Post by: Shoop da Whoop on January 09, 2010, 08:31
Th Matrix has us!