示例#1
0
            public AnimalHierarchy.Animal createAnimal(Random rGen)
            {
                AnimalHierarchy.Animal animal = null;

                switch (rGen.Next(MAX_ANIMALS.AFRICA))
                {
                    case 0:
                        animal = new AnimalHierarchy.Elephant();
                        break;
                }

                return animal;
            }
示例#2
0
            public AnimalHierarchy.Animal createAnimal(Random rGen)
            {
                AnimalHierarchy.Animal animal = null;

                switch (rGen.Next(MAX_ANIMALS.AFRICA))
                {
                case 0:
                    animal = new AnimalHierarchy.Elephant();
                    break;
                }

                return(animal);
            }