public void run()
        {
            // Maeland = new Village("Maeland", false);
            // Helmholtz = new Village("Helmholtz", false);
            Alst   = new Village("Alst", false);
            Wessig = new Village("Wessig", true);
            //Badden = new Village("Badden", false);
            //Uster = new Village("Uster", false);
            Schvenig = new Village("Schvenig", false);

            Alst.west = Schvenig;
            Alst.east = Wessig;
            Alst.distanceToEastVillage = 14;
            Alst.distanceToWestVillage = 19;

            Schvenig.west = null;
            Schvenig.east = null;
            //Schvenig.distanceToNextVillage = 14;

            Wessig.west = null;
            Wessig.east = null;
            //Wessig.distanceToNextVillage = 14;
            this.travelvillage(Alst);
        }
예제 #2
0
        public void Run()
        {
            Alst      = new Village("Alst", false);
            Schvenig  = new Village("Schvenig", false);
            Wessig    = new Village("Wessig", false);
            Maeland   = new Village("Maeland", false);
            Helmholtz = new Village("Helmholtz", false);
            Badden    = new Village("Badden", false);
            Uster     = new Village("Uster", true);
            // 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);
            Badden.VillageSetup(11, null, null);
            Uster.VillageSetup(28, null, null);

            // TO DO: Complete this section

            this.TraverseVillages(Alst);
            this.Announcement();
        }
예제 #3
0
 public void VillageSetup(int _prevVillageDist, Village _westVillage, Village _eastVillage)
 {
     east = _eastVillage;
     west = _westVillage;
     distanceFromPreviousVillage = _prevVillageDist;
 }