Esempio n. 1
3
        static void Main(string[] args)
        {
            AppSettingsReader appSettings = new AppSettingsReader();
             Console.WriteLine(appSettings.GetValue("appConStr", typeof(string)));

             Animal animal = new Bear();
             Person person = new Janitor();

             int numbOfTimes = (int) appSettings.GetValue("timesToSayHello", typeof (int));
             for( int i = 0; i < numbOfTimes; i++)
             {
            animal.Speak();
            person.Speak();
             }

             Console.ReadLine();
        }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        danceCircle = Instantiate((GameObject)(Resources.Load("Prefabs/PrinceDanceCircle")));
        danceCircle.SetActive(false);

        danceValue       = 0f;
        danceMeterSlider = GameObject.Find("UI").GetComponent <Transform>().Find("DanceMeter").gameObject.GetComponent <Slider>();
        danceMeter       = GameObject.Find("DanceMeter");
        danceMeter.SetActive(false);

        danceTutWindow = GameObject.Find("DanceTutWindow");
        danceTutWindow.SetActive(false);
        activeDanceTut = false;

        bear       = GameObject.Find("Bear");
        bearScript = bear.GetComponent <Bear>();

        button = GameObject.Find("e key");
        audios = GetComponents <AudioSource>();

        model = GetComponent <Transform>().Find("model").gameObject;

        pressedE           = false;
        danceCirclePresent = false;
        prevStartWalkTime  = 0f;

        // if this has waypoints, get waypoints
        hasWayPoints = (waypoints != null && waypoints.Length > 0);
        if (hasWayPoints)
        {
            currentWaypoint = waypoints[0];
            currentIndex    = 0;
        }
    }
Esempio n. 3
0
        public void OneFromListComponent()
        {
            MainCage mc      = new MainCage();
            Animal   wolf    = new Wolf();
            Animal   bear    = new Bear();
            Animal   giraffe = new Giraffe();
            List <ICageComponent> components = new List <ICageComponent>();

            components.Add(wolf);
            components.Add(bear);
            components.Add(giraffe);

            int            number = 0;
            int            weight = 50;
            ICageComponent component;

            mc.AddAnimal(weight);
            component = mc.isOne(number);

            foreach (var expected in components)
            {
                if (expected.GetType() == component.GetType())
                {
                    Assert.AreEqual(expected.GetType(), component.GetType());
                }
            }
        }
Esempio n. 4
0
        public static void init()
        {
            Lion lion = new Lion();

            lion.Name     = "Lion Simba";
            lion.ID       = 1;
            lion.Hungry   = true;
            lion.FeedDate = "2018-05-05";
            animals.Add(lion);

            Bear bear = new Bear();

            bear.Name     = "Michael the bear";
            bear.ID       = 2;
            bear.Hungry   = true;
            bear.FeedDate = "2018-05-05";
            animals.Add(bear);


            Bear bear2 = new Bear();

            bear2.Name     = "Bear Misha";
            bear2.ID       = 2;
            bear2.Hungry   = true;
            bear2.FeedDate = "2018-05-05";
            animals.Add(bear2);

            User yaLubimiy = new User("zahar");

            yaLubimiy.ID = 1;
            // yaLubimiy.ChatId = 376484784;
            yaLubimiy.addAnimal(lion);

            users.Add(yaLubimiy);
        }
Esempio n. 5
0
        public void IsBearCampingDestroyerUnlikeTiger()
        {
            Bear bear           = new Bear();
            bool canIKeepTheCub = bear.CampingCrasher;

            Assert.True(canIKeepTheCub);
        }
Esempio n. 6
0
        public void BearProducesCubs()
        {
            Bear   bear = new Bear();
            string cubs = bear.Cubs();

            Assert.Equal("My babies are called cubs!", cubs);
        }
Esempio n. 7
0
        public void BearEats()
        {
            Bear   bear  = new Bear();
            string honey = bear.Eat();

            Assert.Equal("Honey comb please!", honey);
        }
Esempio n. 8
0
        // I.method
        public Animal createAnimal(int animalCode)
        {
            Animal newAnimal = null;

            switch (animalCode)
            {
            case 0:
                newAnimal = new Bison();
                break;

            case 1:
                newAnimal = new Wolf();
                break;

            case 2:
                newAnimal = new Eagle();
                break;

            case 3:
                newAnimal = new Bear();
                break;
            }

            return(newAnimal);
        }
Esempio n. 9
0
    IEnumerator Shoot()
    {
        hitObject = Physics2D.Raycast(bulletLine.transform.position, bulletLine.transform.right, distance);

        if (hitObject)
        {
            if (hitObject.collider.gameObject.CompareTag("Bear") && GameManager.instance.onClick == false)
            {
                Bear bear = hitObject.collider.gameObject.GetComponent <Bear>();

                bear.GetDamage(damage);

                bulletLine.SetPosition(0, bulletLine.transform.position);
                bulletLine.SetPosition(1, hitObject.point);
            }
        }
        else
        {
            bulletLine.SetPosition(0, bulletLine.transform.position);
            bulletLine.SetPosition(1, bulletLine.transform.position + bulletLine.transform.right * distance);
        }

        bulletLine.enabled = true;

        yield return(new WaitForSeconds(0.2f));

        bulletLine.enabled = false;
    }
            public static void then_if_lumberjack_should_maul()
            {
                // Arrange
                var numberGeneratorService = new Mock <INumberGeneratorService>();
                var specificSet            = new[] { 2 };
                var calls = 0;

                numberGeneratorService.Setup(service => service.GetNextRandomOfBound(It.IsAny <int>())).Returns(() => specificSet[calls]).Callback(() => calls++);
                var bear   = new Bear(0, 0, numberGeneratorService.Object);
                var forest = new Mock <IForest>();

                forest.Setup(forest1 => forest1.Bound).Returns(3);
                forest.Setup(forest1 => forest1.IsOpenSpot(1, 1)).Returns(false);
                forest.Setup(forest1 => forest1.GridContents(new Point(0, 0))).Returns((List <IForestObject>)null);
                var lumberJack = new LumberJack(0, 0);

                forest.Setup(forest1 => forest1.GridContents(new Point(1, 1)))
                .Returns(new List <IForestObject>()
                {
                    lumberJack
                });

                // Act
                bear.Tick(forest.Object);

                // Assert
                forest.Verify(forest1 => forest1.Remove(lumberJack));
            }
            public static void then_should_stop_moving()
            {
                // Arrange
                var numberGeneratorService = new Mock <INumberGeneratorService>();
                var specificSet            = new[] { 2, 7, 7, 7, 7 };
                var calls = 0;

                numberGeneratorService.Setup(service => service.GetNextRandomOfBound(It.IsAny <int>())).Returns(() => specificSet[calls]).Callback(() => calls++);
                var bear   = new Bear(0, 0, numberGeneratorService.Object);
                var forest = new Mock <IForest>();

                forest.Setup(forest1 => forest1.Bound).Returns(5);
                forest.Setup(forest1 => forest1.IsOpenSpot(1, 1)).Returns(false);
                forest.Setup(forest1 => forest1.GridContents(new Point(0, 0))).Returns((List <IForestObject>)null);
                forest.Setup(forest1 => forest1.GridContents(new Point(1, 1)))
                .Returns(new List <IForestObject>()
                {
                    new Mock <ILumberJack>().Object
                });

                // Act
                bear.Tick(forest.Object);

                // Assert
                Assert.That(bear.Location.X, Is.EqualTo(1));
                Assert.That(bear.Location.Y, Is.EqualTo(1));
            }
Esempio n. 12
0
        private void PlacementObject()
        {
            Random random = new Random();

            #region Monsters-2
            MyMonster = new Bear(300, new Point
            {
                x = random.Next(PlayerHero.Position.x + 2, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 2, PlayerField.Height)
            },
                                 20);

            MyMonster = new Wolf(200, new Point
            {
                x = random.Next(PlayerHero.Position.x + 2, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 2, PlayerField.Height)
            },
                                 15);
            #endregion

            #region Obstacles-2
            MyObstacle = new Tree(new Point
            {
                x = random.Next(PlayerHero.Position.x + 1, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 3, PlayerField.Height)
            },
                                  100);

            MyObstacle = new Stone(new Point
            {
                x = random.Next(PlayerHero.Position.x + 1, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 3, PlayerField.Height)
            },
                                   100);
            #endregion

            #region Bonus-3
            MyBonus = new Apple(new Point
            {
                x = random.Next(PlayerHero.Position.x + 1, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 3, PlayerField.Height)
            },
                                30);

            MyBonus = new Cherry(new Point
            {
                x = random.Next(PlayerHero.Position.x + 1, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 3, PlayerField.Height)
            },
                                 20);

            MyBonus = new Shaurma(new Point
            {
                x = random.Next(PlayerHero.Position.x + 1, PlayerField.Width),
                y = random.Next(PlayerHero.Position.y + 3, PlayerField.Height)
            },
                                  50);

            #endregion
        }
Esempio n. 13
0
        static void Main(string[] args)
        {
            var radnor = new Forest("Radnor Lake", "Nashville");

            var squirrel = new Squirrel("Squirrel", "Patchy")
            {
                TailLength = 4
            };
            var turtle = new Animal {
                Name = "Turtle", NumberOfLegs = 4, Fur = false
            };
            var mockingbird = new Animal {
                Name = "Mockingbird", NumberOfLegs = 2, Fur = true
            };
            var bear = new Bear("Yogi", "Blue")
            {
                TailLength = 1
            };
            var seal = new Seal("Sammie");

            radnor.AddAnimal(turtle);
            radnor.AddAnimal(squirrel);
            radnor.AddAnimal(mockingbird);
            radnor.AddAnimal(bear);
            radnor.AddAnimal(seal);


            radnor.ListAnimals();
        }
Esempio n. 14
0
 public override void DoBeforeEntering()
 {
     mBear = mCharacter as Bear;
     mCharacter.PlayAnim("run", 3);
     mReached = false;
     mBear.NormalSpeed();
 }
Esempio n. 15
0
        static void Main(string[] args)
        {
            {
                zoo     = new Zoo();
                console = ZooConsole.GetInstance(zoo);

                BearCage       bearCage       = bearCageFactory.CreateCage() as BearCage;
                BearFemaleCage bearFemaleCage = femaleBearCageFactory.CreateCage() as BearFemaleCage;
                zoo.Add(bearCage);
                zoo.Add(bearFemaleCage);

                Bear femaleBear = bearFactory.CreateAnimal(Models.Enums.MaleMode.Female) as Bear;
                Bear maleBear   = bearFactory.CreateAnimal(Models.Enums.MaleMode.Male) as Bear;
                femaleBear.Name   = "Female bear";
                maleBear.Name     = "Male bear";
                femaleBear.Weight = 40;
                maleBear.Weight   = 130;

                Container contForFemale = zoo.GetContainerForAnimal(femaleBear);
                contForFemale.Add(femaleBear);

                Container contForMale = zoo.GetContainerForAnimal(maleBear);
                contForMale.Add(maleBear);
            }
            while (true)
            {
                console.DisplayMainMenu();
            }
        }
Esempio n. 16
0
        private void AddBear(Forest forest)
        {
            Bear newBear = new Bear();

            newBear.Location = forest.GetRandomEmptyPosition().Location;
            forest.AddEntity(newBear);
        }
Esempio n. 17
0
        static void Main(string[] args)
        {
            Animal animal1 = new Dog();

            animal1.Name = "Sparky";
            Console.WriteLine(animal1.Speak());
            Console.WriteLine(animal1.Sleep());

            Dog dog = animal1 as Dog; //Casting

            dog.Eat();

            Animal animal2 = new Bear();

            animal2.Name = "Teddy";
            Console.WriteLine(animal2.Speak());

            Animal animal3 = new Pig();

            animal3.Name = "Orton";
            Console.WriteLine(animal3.Speak());

            // This is an error, can't create instance of Animal class

            /*
             * Animal animal4 = new Animal();
             * animal4.Name = "Snoopy";
             * Console.WriteLine(animal4.Speak());
             */
        }
Esempio n. 18
0
        public void BearMakesSound()
        {
            Bear   bear  = new Bear();
            string growl = bear.Sound();

            Assert.Equal("Growl!", growl);
        }
Esempio n. 19
0
 void FixedUpdate()
 {
     Timer++;
     TickTimer++;
     if (TickTimer >= Speed)
     {
         Score        += 10;
         scoretxt.text = "Score: " + Score.ToString();
         lvltxt.text   = "Level: " + Level.ToString();
         DeathManager();
         SoundManager.GetComponent <SoundManager>().PlaySound(SoundManager.GetComponent <SoundManager>().timeTick);
         TickTimer = 0;
     }
     if (Timer == LevelUpSpeed)
     {
         if (Speed > MaxSpeed)
         {
             Speed -= 2;
             Fish.GetComponent <AttackMonster>().Speed     = Speed;
             Bear.GetComponent <AttackMonster>().Speed     = Speed;
             IceBlock.GetComponent <AttackMonster>().Speed = Speed;
         }
         if (Rand > MaxRandom && Speed % 4 == 0)
         {
             Fish.GetComponent <AttackMonster>().Rand     = Rand;
             Bear.GetComponent <AttackMonster>().Rand     = Rand;
             IceBlock.GetComponent <AttackMonster>().Rand = Rand;
         }
         Score += 200;
         Level++;
         Timer = 0;
         SoundManager.GetComponent <SoundManager>().PlaySound(SoundManager.GetComponent <SoundManager>().speedUp);
     }
 }
Esempio n. 20
0
        public void BearLives()
        {
            Bear   bear   = new Bear();
            string forest = bear.Live();

            Assert.Equal("I live in dense forest", forest);
        }
Esempio n. 21
0
        private void btnCreatePolarBear_Click(object sender, EventArgs e)
        {
            string myName = "Shit Head"; // will be changed by the filth filter
            Bear   myBear = new Bear(ref myName, Bear.color.white);

            lblDescription.Text = myBear.AboutMe; // notice here that the bear class does not change the default interesting feature variable from the animal class
        }
Esempio n. 22
0
        public void ShouldOverrideSleepMethod()
        {
            Bear teddionel = new Bear();
            Lion lionel    = new Lion();

            Assert.True(lionel.Sleep() != teddionel.Sleep());
        }
Esempio n. 23
0
        private void btnCreateBrownBear_Click(object sender, EventArgs e)
        {
            string myName = "Yogi Bear";
            Bear   myBear = new Bear(ref myName, Bear.color.brown);

            lblDescription.Text = myBear.AboutMe;
        }
Esempio n. 24
0
        public void IsBearDomesticatable()
        {
            Bear bear           = new Bear();
            bool canIKeepTheCub = bear.Domesticatable;

            Assert.False(canIKeepTheCub);
        }
Esempio n. 25
0
 public override void DoBeforeEntering()
 {
     mBear      = mCharacter as Bear;
     mCurType   = E_SuccessType.Move;
     mOrginPos  = mCharacter.position;
     mReachHome = false;
 }
Esempio n. 26
0
 public void Enter(Bear bear)
 {
     _bear = bear;
     _bear.sleepyFX.Play();
     _bear.isSleepState        = true;
     _bear._navMeshAgent.speed = 0;
 }
Esempio n. 27
0
    public void BearMakeSound()
    {
        string expected = "Roar!";
        string actual   = new Bear().MakeSound();

        Assert.AreEqual(expected, actual, "Bear should say Roar!");
    }
Esempio n. 28
0
        public void Add_new_object_returned_weight_checked()
        {
            Animal expected = new Bear("Ben", 300);
            Animal actual   = cr.Add(cr.Name, cr.Weight);

            Assert.AreEqual(expected.weight, actual.weight);
        }
Esempio n. 29
0
    void Start()
    {
        clickSound = Deer.GetComponent <AudioSource>();
        bgMusic    = GetComponent <AudioSource>();
        int randomnum = Random.Range(0, 5);

        for (int i = 0; i < randomnum; i++)
        {
            randomPos(x);
        }
        check2        = 0;
        check         = 0;
        time          = 0;
        BeariniPost   = Bear.transform.position;
        FoxiniPost    = Fox.transform.position;
        FroginiPost   = Frog.transform.position;
        MiceiniPost   = Mice.transform.position;
        CatiniPost    = Cat.transform.position;
        KanciliniPost = Kancil.transform.position;
        CowiniPost    = Cow.transform.position;
        DeeriniPost   = Deer.transform.position;

        Cat.SetActive(false);
        Cow.SetActive(false);
        Kancil.SetActive(false);
        Bear.SetActive(false);
        Fox.SetActive(false);
        Frog.SetActive(false);
        Mice.SetActive(false);
        buttonnext1.SetActive(false);
    }
Esempio n. 30
0
    static void Main()
    {
        //Instantiate an object for each of the derived classes (Lion, Tiger, Bear)
        Lion  Aslan  = new Lion("Aslan");
        Tiger Tigger = new Tiger("Tigger");
        Bear  Baloo  = new Bear("Baloo");

        //Call member methods for each
        Aslan.setGazellesHugged(5);
        Tigger.setLasersChased(9);
        Baloo.setSalmonCaught(15);

        //Output number of Animal objects instantiated
        Console.WriteLine("There are " + $"{Animal.getAnimalCount()}" +
                          " instantiated Animal objects.");
        Console.WriteLine();

        //Array of type Animal
        Animal[] myArray = new Animal[3];

        //Populate array
        myArray[0] = Aslan;
        myArray[1] = Tigger;
        myArray[2] = Baloo;

        //For loop will call overridden ToString() method for each animal in array
        for (int i = 0; i < Animal.getAnimalCount(); ++i)
        {
            Console.WriteLine($"{myArray[i].ToString()}");
            Console.WriteLine($"The animal's sound is {myArray[i].makeSound()}.");
            Console.WriteLine();
        }
    }
    // Bullet hitting enemies
    void OnTriggerEnter2D(Collider2D hitInfo)
    {
        // Hit info on what enemies the bullet hits
        Rat  rat  = hitInfo.GetComponent <Rat>();
        Wolf wolf = hitInfo.GetComponent <Wolf>();
        Bear bear = hitInfo.GetComponent <Bear>();

        if (rat != null)
        {
            // Rat Death sounds
            PlayerSoundScript.PlaySound("RatDeath");
            // Rat takes damage from the shotgun bullet
            rat.TakeDamage(shotgundamage);
        }

        if (wolf != null)
        {
            // Wolf Death sounds
            PlayerSoundScript.PlaySound("DogBark");
            // Wolf takes damage from the shotgun bullet
            wolf.TakeDamage(shotgundamage);
        }

        if (bear != null)
        {
            // Boss Death sounds
            //PlayerSoundScript.PlaySound ("Growl");
            // boss takes damage from the shotgun bullet
            bear.TakeDamage(shotgundamage);
        }
        // When adequate damage is given to enemy they are destroyed
        Destroy(gameObject);
    }
Esempio n. 32
0
        /// <summary>
        /// Constructor for GummiBears effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public GummiBears(ref Sound sound)
        {
            PlayedSongs = new List<int>();
            snd = sound;

            songName = new string[8];
            songName[0] = "GummiSwe";
            songName[1] = "GummiDan";
            songName[2] = "GummiEng";
            songName[3] = "GummiGer";
            songName[4] = "GummiJap";
            songName[5] = "GummiNor";
            songName[6] = "GummiPol";
            songName[7] = "GummiRus";

            textures = new int[7]; // there are 7 in the "newer" gummi bears, 6 in the older (Gusto is a new one)...
            textures[0] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/zummi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[1] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/grammi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[2] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/tummi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[3] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gruffi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[4] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sunni.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[5] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/cubbi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[6] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gusto.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Swedish.ogg", songName[0]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Danish.ogg", songName[1]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-English.ogg", songName[2]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-German.ogg", songName[3]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Japanese.ogg", songName[4]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Norwegian.ogg", songName[5]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Polish.ogg", songName[6]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Russian.ogg", songName[7]);

            currentSound = Util.Rnd.Next(0, songName.Length); // do this random and add to list of played?
            PlayedSongs.Add(currentSound);
            LastPlayedDate = string.Empty;
            Bears = new Bear[7];
            // left max = 1.2, right max = -1.7,
            Bears[0] = new Bear(0.4f, 0.4f, 1.0f, -0.5f, 0.40006f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[0]);
            Bears[1] = new Bear(0.4f, 0.4f, 0.75f, 0.0f, 0.40005f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[1]);
            Bears[2] = new Bear(0.4f, 0.4f, 0.5f, 0.0f, 0.40004f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[2]);
            Bears[3] = new Bear(0.4f, 0.4f, 0.0f, 0.0f, 0.40003f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[3]);
            Bears[4] = new Bear(0.25f, 0.35f, -0.5f, 0.0f, 0.40002f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[4]);
            Bears[5] = new Bear(0.3f, 0.3f, -1.0f, 0.0f, 0.40001f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[5]);
            Bears[6] = new Bear(0.4f, 0.4f, -1.5f, 0.0f, 0.40000f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[6]);
        }
Esempio n. 33
0
    public static Animal Make(AnimalType type) {
        Animal result = null;

        switch (type)
        {
            case AnimalType.Bear:
                result = new Bear();
                break;            
            case AnimalType.Dragon:
                result = new Dragon();
                break;            
            default:
                result = new Tiger();
                break;            
        } 

        return result;
    }