public AnimalModel ChoiceAnimal(int isSheep) { var type = (AnimalType)isSheep; AnimalModel animal; switch (type) { case AnimalType.SHEEP: animal = SheepModel.GetSheep(); return(animal); case AnimalType.WOLF: animal = WolfModel.GetWolf(); return(animal); case AnimalType.DUCK: animal = DuckModel.GetDuck(); return(animal); case AnimalType.HUNTER: animal = HunterModel.GetHunter(); return(animal); default: break; } return(null); }
public static AnimalModel GetSheep() { var sheep = new SheepModel(); sheep.Id = Guid.NewGuid().ToString(); sheep.URL = GetRandomImage(); return(sheep); }