public void GetAdjacentRoomsOneCellAllNearDetached()
        {
            // completely filled for all but the one-cell room, detached
            string[] inGrid =
            {
                "G#D#H",
                "# . #",
                "C.A.E",
                "# . #",
                "F#B#I",
            };

            TestGridFloorPlan floorPlan = TestGridFloorPlan.InitGridToContext(inGrid);
            List <int>        rooms     = floorPlan.GetAdjacentRooms(0);
            List <int>        compare   = new List <int>();

            Assert.That(rooms, Is.EqualTo(compare));
        }
        public void GetAdjacentRoomsOneCellNoneNear()
        {
            // completely lone one-cell room
            string[] inGrid =
            {
                "0.0.0",
                ". . .",
                "0.A.0",
                ". . .",
                "0.0.0",
            };

            TestGridFloorPlan floorPlan = TestGridFloorPlan.InitGridToContext(inGrid);
            List <int>        rooms     = floorPlan.GetAdjacentRooms(0);
            List <int>        compare   = new List <int>();

            Assert.That(rooms, Is.EqualTo(compare));
        }
        public void GetAdjacentRoomsMultiCellRepeat()
        {
            // many cell room with double dip on a room
            string[] inGrid =
            {
                "0.C.0",
                ". # .",
                "B#A#D",
                ". . .",
                "B#A#D",
            };

            TestGridFloorPlan floorPlan = TestGridFloorPlan.InitGridToContext(inGrid);
            List <int>        rooms     = floorPlan.GetAdjacentRooms(0);
            List <int>        compare   = new List <int> {
                2, 1, 3
            };

            Assert.That(rooms, Is.EqualTo(compare));
        }
        public void GetAdjacentRoomsOneCellAllNear()
        {
            // completely filled one-cell room
            string[] inGrid =
            {
                "0.D.0",
                ". # .",
                "C#A#E",
                ". # .",
                "0.B.0",
            };

            TestGridFloorPlan floorPlan = TestGridFloorPlan.InitGridToContext(inGrid);
            List <int>        rooms     = floorPlan.GetAdjacentRooms(0);
            List <int>        compare   = new List <int> {
                3, 1, 2, 4
            };

            Assert.That(rooms, Is.EqualTo(compare));
        }
        public void GetAdjacentRoomsMultiCellAll()
        {
            // completely filled many-cell room
            string[] inGrid =
            {
                "0.G.H.I.0",
                ". # # # .",
                "E#A.A.A#J",
                ". . . . .",
                "F#A.A.A#K",
                ". # # # .",
                "0.B.C.D.0",
            };

            TestGridFloorPlan floorPlan = TestGridFloorPlan.InitGridToContext(inGrid);
            List <int>        rooms     = floorPlan.GetAdjacentRooms(0);
            List <int>        compare   = new List <int> {
                6, 1, 7, 2, 8, 3, 4, 9, 5, 10
            };

            Assert.That(rooms, Is.EqualTo(compare));
        }