Update main.pas

Life 10.7
[Optimization] Boolean expressions improved.