refactoring
apple not placed on snake