snake program in C++