コード例 #1
0
ファイル: Program.cs プロジェクト: C073699/CSD3354-S3-A3
        public void Run()
        {
            Alst      = new Village("Alst", false);
            Schvenig  = new Village("Schvenig", false);
            Maeland   = new Village("Maeland", false);
            Uster     = new Village("Uster", false);
            Badden    = new Village("Badden", false);
            Helmholtz = new Village("Helmholtz", false);
            Wessig    = new Village("Wessig", false);
            // TO DO: Complete this section

            Alst.VillageSetup(0, Schvenig, Wessig);
            Schvenig.VillageSetup(14, Maeland, Helmholtz);
            Wessig.VillageSetup(19, Uster, Badden);
            Maeland.VillageSetup(9, null, null);
            Helmholtz.VillageSetup(28, null, null);
            Uster.VillageSetup(28, null, null);
            Badden.VillageSetup(11, null, null);
            // TO DO: Complete this section

            this.TraverseVillages(Alst);
            this.Announcement();
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: C073699/CSD3354-S3-A3
 public void VillageSetup(int _prevVillageDist, Village _westVillage, Village _eastVillage)
 {
     east = _eastVillage;
     west = _westVillage;
     distanceFromPreviousVillage = _prevVillageDist;
 }