Ejemplo n.º 1
0
        internal void printZombieInfo()
        {
            if (this.zombies.Count == 0)
            {
                Console.WriteLine("[]");
                return;
            }
            StringBuilder info = new StringBuilder("[");

            for (int x = 0; x < this.zombies.Count - 1; x++)
            {
                IZombie zombie = this.zombies[x];
                info.Append(zombie.getInfo() + ", ");
            }

            info.Append(this.zombies[this.zombies.Count - 1].getInfo() + "]");

            Console.WriteLine(info);
        }