implementation of snake game for learning curses library