示例#1
0
        static void Main(string[] args)
        {
            Forest f = new Forest("Columbia");

            Forest.PrintTreeFacts();
            f.Burn();
            f.Grow();
            f.Grow();
            Console.WriteLine(f.Trees);
        }
示例#2
0
        static void Main(string[] args)
        {
            Forest f = new Forest("Congo", "Tropical");

            f.Grow();

            Console.WriteLine(Forest.TreeFacts);
        }
示例#3
0
        static void Main(string[] args)
        {
            Forest f = new Forest("Amazon");

            Console.WriteLine(f.Trees);

            for (var i = 0; f.age < 5; i++)
            {
                f.Grow();
            }

            Console.WriteLine(f.Trees);
            f.Burn();

            Console.WriteLine(f.Trees);
            Console.WriteLine(f.age);

            Console.WriteLine();
            Forest.PrintTreeFacts();
        }