コード例 #1
0
ファイル: Program.cs プロジェクト: C073699/CSD3354-S3-A3
        static void Main()
        {
            var         Hugi = new Hugi();
            CountrySide a    = new CountrySide();

            a.Run();
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: C073699/CSD3354-S3-A3
        public void TraverseVillages(Village CurrentVillage)
        {
            if (Hugi.FoundAstrilde)
            {
                return;
            }

            // Here Hugi records his travels, as any Norse Hero will do:
            Hugi.HugiJournal.Add(new JournalEntry(CurrentVillage.VillageName, CurrentVillage.distanceFromPreviousVillage));
            try
            {
                Console.WriteLine("I am in {0}", CurrentVillage.VillageName);

                if (CurrentVillage.isAstrildgeHere)
                {
                    Console.WriteLine("I found Dear Astrildge in {0}", CurrentVillage.VillageName);
                    Console.WriteLine("**** FEELING HAPPY!!! ******");
                    Console.WriteLine("Astrilde, I walked {0} vika to find you. Will you marry me?", Hugi.CalculateDistanceWalked());
                    Hugi.FoundAstrilde = true;
                }
                TraverseVillages(CurrentVillage.east);
                TraverseVillages(CurrentVillage.west);
            }

            catch (NullReferenceException) { }
        }