Sinking ship simulation written in C++