the snake using curses liabary