% Include:
Inverse_glider
Glider_gun
Eaters

Input=zeros(100,100);

%9x36 Glider
%4x4 eater1
%6x9 eater2

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%Collision
Input=zeros(100,100);

Part=1*Glider_P;
PosX=10;
PosY=10;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;


Part=1*Glider_I;
PosX=11;
PosY=49;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{
%AND gate
Input=zeros(100,100);

%A
Part=1*Glider_P;
PosX=10;
PosY=10;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

% %B
Part=1*Glider_P;
PosX=10;
PosY=48;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

%Perpendicular Gun 
Part=1*Glider_I;
PosX=11;
PosY=137;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

%Output
Part=1*Eater2;
PosX=90;
PosY=101;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{
%OR gate
Input=zeros(100,100);

%Parallel Gun
Part=1*Glider_P;
PosX=10;
PosY=10;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

%A
Part=1*Glider_P;
PosX=10;
PosY=48;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

%B
Part=1*Glider_P;
PosX=10;
PosY=88;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

%Perpendicular Gun
Part=1*Glider_I;
PosX=11;
PosY=137;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;

%Output
Part=1*Eater2;
PosX=90;
PosY=101;
Input(PosX:(PosX+size(Part,1)-1),PosY:(PosY+size(Part,2)-1))=Part;
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Ez futtatja a szimulaciot
ca2d(Input,0.03,1000)
