prevent snake from running into itself