public void RoomTemplatesCanBeRetrievedById()
        {
            RoomTemplate room1 = LoadTemplateFromFile("DDRogueTest.testdata.vaults.testalignmentroom1.room");

            TemplatedMapBuilder mapBuilder = new TemplatedMapBuilder();
            TemplatedMapGenerator mapGen = new TemplatedMapGenerator(mapBuilder);

            var room1Id = mapGen.PlaceRoomTemplateAtPosition(room1, new Point(-5, -5));
            TemplatePositioned roomTemplate = mapGen.GetRoomTemplateById(room1Id);

            Assert.AreEqual(new Point(-5, -5), roomTemplate.Location);
        }
        public void ReplaceRoomsHaveTheSameIds()
        {
            //Load sample template 8x4
            RoomTemplate baseRoom = LoadTemplateFromFile("DDRogueTest.testdata.vaults.testalignmentroom1.room");
            RoomTemplate joinedRoom = LoadTemplateFromFile("DDRogueTest.testdata.vaults.testalignmentroom2.room");

            RoomTemplate replacementRoom = LoadTemplateFromFile("DDRogueTest.testdata.vaults.testoverlap2.room");

            TemplatedMapBuilder mapBuilder = new TemplatedMapBuilder();
            TemplatedMapGenerator mapGen = new TemplatedMapGenerator(mapBuilder);

            var originalId = mapGen.PlaceRoomTemplateAtPosition(baseRoom, new Point(0, 0));
            mapGen.PlaceRoomTemplateAlignedWithExistingDoor(joinedRoom, null, mapGen.PotentialDoors[0], 0, 0);

            var placementSucess = mapGen.ReplaceRoomTemplate(0, new Connection(0, 1), replacementRoom, 0);

            var roomTemplateById = mapGen.GetRoomTemplateById(originalId).Room;

            //This is a bit weak as an integration test - the replacement room gets rotated hence the strange comparison
            Assert.AreEqual(replacementRoom.Height, roomTemplateById.Width);
        }