Percolation system for simulations in C++