Snake game in C using ncurses