implemented automatic random apple generation with min and max