Example #1
0
        public override void Visit(Lion lion)
        {
            if (lion.Gender == Gender)
            {
                return;
            }

            for (int i = 0; i < 2; i++)
            {
                var gender = (Gender) Random.Next(0, 2);
                var cub = new Lion(this.spawner, gender);
                this.spawner.Spawn(cub);
            }

            base.Visit(lion);
        }
Example #2
0
        public override void Visit(Lion lion)
        {
            if (lion.Gender == Gender)
            {
                return;
            }

            for (int i = 0; i < 2; i++)
            {
                var gender = (Gender)Random.Next(0, 2);
                var cub    = new Lion(this.spawner, gender);
                this.spawner.Spawn(cub);
            }

            base.Visit(lion);
        }