C++ snake using framebuffer