c++ version of the famous game Snake