2D particle system written in C++