C++ simulation of water pool