Тема: Матриця
Сьогодні згадав про фільм "Матриця" і мені захотілось зробити написати програму яка буде відображати на чорному фоні 1 і 0 зеленого кольору. Написав, працює . Але я не можу зрозуміти я поліпшити мій код. Допоможіть кому не лінь.
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Timer1: TTimer;
Timer2: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
q,z,x,i,f:integer;
taras:array [0..1600] of integer;
max :array [0..1600] of integer;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
i:=-60;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
form1.top:=0;
i:=i+30;
for f:= 1 to 1600 do
begin
q:=taras[f]+20;
z:=max[f]+30;
begin
with Canvas do
begin
font.Color:=clgreen;
font.Size:=20;
randomize;
textout(3,z+i,inttostr (random(2)));
textout(q,z+i-90,inttostr (random(2)));
textout(q*2,z+i-60,inttostr (random(2)));
textout(q*3,z+i-150,inttostr (random(2)));
textout(q*4,z+i-180,inttostr (random(2)));
textout(q*5,z+i-60,inttostr (random(2)));
textout(q*6,z+i-150,inttostr (random(2)));
textout(q*7,z+i-180,inttostr (random(2)));
textout(q*8,z+i-60,inttostr (random(2)));
textout(q*9,z+i-180,inttostr (random(2)));
textout(q*10,z+i-150,inttostr (random(2)));
textout(q*11,z+i-60,inttostr (random(2)));
textout(q*12,z+i-180,inttostr (random(2)));
textout(q*13,z+i-150,inttostr (random(2)));
textout(q*14,z+i-60,inttostr (random(2)));
textout(q*15,z+i-180,inttostr (random(2)));
textout(q*16,z+i-150,inttostr (random(2)));
textout(q*17,z+i-60,inttostr (random(2)));
textout(q*18,z+i-180,inttostr (random(2)));
textout(q*19,z+i-150,inttostr (random(2)));
textout(q*20,z+i-60,inttostr (random(2)));
textout(q*21,z+i-180,inttostr (random(2)));
textout(q*22,z+i-150,inttostr (random(2)));
textout(q*23,z+i-60,inttostr (random(2)));
textout(q*24,z+i-180,inttostr (random(2)));
textout(q*25,z+i-150,inttostr (random(2)));
textout(q*26,z+i-60,inttostr (random(2)));
textout(q*27,z+i-180,inttostr (random(2)));
textout(q*28,z+i-150,inttostr (random(2)));
textout(q*29,z+i-60,inttostr (random(2)));
textout(q*30,z+i-180,inttostr (random(2)));
textout(q*31,z+i-150,inttostr (random(2)));
textout(q*32,z+i-60,inttostr (random(2)));
textout(q*33,z+i-180,inttostr (random(2)));
textout(q*34,z+i-150,inttostr (random(2)));
textout(q*35,z+i-60,inttostr (random(2)));
textout(q*36,z+i-180,inttostr (random(2)));
textout(q*37,z+i-150,inttostr (random(2)));
if i>=form1.clientHeight+30 then
begin
i:=-60;
end;
end;
end;
end;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
for f:= 1 to 1600 do
begin
q:=taras[f]+20;
z:=max[f]+30;
begin
with Canvas do
begin
font.Color:=clgreen;
font.Size:=20;
randomize;
textout(q*38,z+i,inttostr (random(2)));
textout(q*39,z+i-90,inttostr (random(2)));
textout(q*40,z+i-60,inttostr (random(2)));
textout(q*41,z+i-150,inttostr (random(2)));
textout(q*42,z+i-180,inttostr (random(2)));
textout(q*43,z+i-60,inttostr (random(2)));
textout(q*44,z+i-150,inttostr (random(2)));
textout(q*45,z+i-180,inttostr (random(2)));
textout(q*46,z+i-60,inttostr (random(2)));
textout(q*47,z+i-180,inttostr (random(2)));
textout(q*48,z+i-150,inttostr (random(2)));
textout(q*49,z+i-60,inttostr (random(2)));
textout(q*50,z+i-180,inttostr (random(2)));
textout(q*51,z+i-150,inttostr (random(2)));
textout(q*52,z+i-60,inttostr (random(2)));
textout(q*53,z+i-180,inttostr (random(2)));
textout(q*54,z+i-150,inttostr (random(2)));
textout(q*55,z+i-60,inttostr (random(2)));
textout(q*56,z+i-180,inttostr (random(2)));
textout(q*57,z+i-150,inttostr (random(2)));
textout(q*58,z+i-60,inttostr (random(2)));
textout(q*59,z+i-180,inttostr (random(2)));
textout(q*60,z+i-150,inttostr (random(2)));
textout(q*61,z+i-60,inttostr (random(2)));
textout(q*62,z+i-180,inttostr (random(2)));
textout(q*63,z+i-150,inttostr (random(2)));
textout(q*64,z+i-60,inttostr (random(2)));
textout(q*65,z+i-180,inttostr (random(2)));
textout(q*66,z+i-150,inttostr (random(2)));
textout(q*67,z+i-60,inttostr (random(2)));
textout(q*68,z+i-180,inttostr (random(2)));
textout(q*69,z+i-150,inttostr (random(2)));
textout(q*70,z+i-60,inttostr (random(2)));
textout(q*71,z+i-180,inttostr (random(2)));
textout(q*72,z+i-150,inttostr (random(2)));
textout(q*73,z+i-60,inttostr (random(2)));
textout(q*74,z+i-180,inttostr (random(2)));
textout(q*75,z+i-150,inttostr (random(2)));
textout(q*76,z+i-60,inttostr (random(2)));
textout(q*77,z+i-150,inttostr (random(2)));
textout(q*78,z+i-120,inttostr (random(2)));
textout(q*79,z+i-150,inttostr (random(2)));
textout(q*80,z+i-180,inttostr (random(2)));
textout(q*81,z+i-150,inttostr (random(2)));
textout(q*82,z+i-150,inttostr (random(2)));
textout(q*83,z+i-90,inttostr (random(2)));
end;
end;
end;
end;
end.