Пример #1
0
        public void AccessTest3()
        {
            Area area = new Area(
                AreaTables.roomtables[0],
                AreaTables.mobtables[0],
                5, 5, false);
            Room start     = new Haven();
            Room candidate = null;

            area.setRoom(0, 0, new OldCellar());
            area.setRoom(1, 0, new OldCellar());
            area.setRoom(2, 0, new OldCellar());
            area.setRoom(2, 1, new OldCellar());
            area.setRoom(2, 2, start);
            area.setRoom(4, 4, new OldCellar());

            area.walk_rooms(start, candidate);

            HashSet <Room> visited = area.getVisitedRooms();

            Assert.IsTrue(visited.Contains(area.getRoom(0, 0)));
            Assert.IsTrue(visited.Contains(area.getRoom(1, 0)));
            Assert.IsTrue(visited.Contains(area.getRoom(2, 2)));
            Assert.IsFalse(visited.Contains(area.getRoom(4, 4)));
        }
Пример #2
0
        public void MaakVeerbootEenHavenInTraject()
        {
            Haven   haven   = new Haven("Gent");
            Traject traject = new Traject();

            traject.VoegToe(haven);
            schip = new Veerboot("Test", 1.0, 1.0, 1.0, 1, traject);
        }
Пример #3
0
        public void MaakCruiseschipEenHavenInTraject()
        {
            Haven   haven   = new Haven("Gent");
            Traject traject = new Traject();

            traject.VoegToe(haven);
            schip = new Cruiseschip("Test", 1.0, 1.0, 1.0, 1, traject);
        }
Пример #4
0
        public void MaakVeerbootTweeHavensInTraject()
        {
            Haven   haven   = new Haven("Gent");
            Haven   haven2  = new Haven("Antwerpen");
            Traject traject = new Traject();

            traject.VoegToe(haven);
            traject.VoegToe(haven2);
            schip = new Veerboot("Test", 1.0, 1.0, 1.0, 1, traject);
            Assert.AreEqual(2, ((Veerboot)schip).Traject.Count);
        }
Пример #5
0
        public void MaakCruiseschipMeerdereHavensInTraject()
        {
            Haven   haven   = new Haven("Gent");
            Haven   haven2  = new Haven("Antwerpen");
            Haven   haven3  = new Haven("Oostende");
            Traject traject = new Traject();

            traject.VoegToe(haven);
            traject.VoegToe(haven2);
            traject.VoegToe(haven3);
            schip = new Cruiseschip("Test", 1.0, 1.0, 1.0, 1, traject);
            Assert.AreEqual(3, ((Cruiseschip)schip).Traject.Count);
        }
Пример #6
0
        public void MaakVeerboot4HavensInTraject()
        {
            Haven   haven   = new Haven("Gent");
            Haven   haven2  = new Haven("Antwerpen");
            Haven   haven3  = new Haven("Oostende");
            Haven   haven4  = new Haven("Zeebrugge");
            Traject traject = new Traject();

            traject.VoegToe(haven);
            traject.VoegToe(haven2);
            traject.VoegToe(haven3);
            traject.VoegToe(haven4);
            schip = new Veerboot("Test", 1.0, 1.0, 1.0, 1, traject);
        }
Пример #7
0
        public void AccessTest5()
        {
            Area area = new Area(
                AreaTables.roomtables[0],
                AreaTables.mobtables[0],
                5, 5, false);
            Room start     = new Haven();
            Room candidate = new OldCellar();

            area.setRoom(0, 0, new OldCellar());
            area.setRoom(1, 0, candidate);
            area.setRoom(2, 0, new OldCellar());
            area.setRoom(2, 1, new OldCellar());
            area.setRoom(2, 2, start);

            Assert.IsFalse(area.test_access(candidate));
        }
Пример #8
0
        public void MaakHavenGentMaaktNieuweHaven()
        {
            Haven haven = new Haven("Gent");

            Assert.AreEqual("Gent", haven.Naam);
        }
Пример #9
0
 public void MaakHavenGeenLegeNaam()
 {
     Haven haven = new Haven("");
 }
Пример #10
0
 public SpaceType(Haven.SpaceType type)
 {
     this.Id = (int)type;
     this.Name = type.GetName();
     this.Description = type.GetDescription();
     this.Icon = type.GetIcon();
 }