Update main.pas

Life 6.4
[Optimization] addLife procedure rewrited, removeLife procedure added.