simple but maybe sufficient 'a snake cannot eat itself' implementation