Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public static AnimalModel GetHunter()
        {
            var hunter = new HunterModel();

            hunter.Id   = Guid.NewGuid().ToString();
            hunter.URL  = GetRandomImage();
            hunter.Name = GetRandomName();
            return(hunter);
        }