public void RoomWithDiagonalGapConnectingWalkableAreasNotConnected() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testfilling_diagonalconnected.room"); var filler = new RoomFilling(roomTemplate); Assert.IsFalse(filler.Connected); }
public void RoomWithPartialVerticalBarrierDividingWalkableAreasIsConnected() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testfilling_dividedgap_vert.room"); var filler = new RoomFilling(roomTemplate); Assert.IsTrue(filler.Connected); }
public void EntirelyUnWalkableRoomIsConnected() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testfilling_notwalkable.room"); var filler = new RoomFilling(roomTemplate); Assert.IsTrue(filler.Connected); }
public void PlacingABlockOffSideOfTemplateFails() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testrouting.room"); //8x4 var filler = new RoomFilling(roomTemplate); filler.SetSquareUnwalkable(new Point(-1, -11)); Assert.IsTrue(filler.Connected); }
public void TestPlacingABlockInCentreOfLargeRoomAllowsPathing() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testrouting.room"); //8x4 var filler = new RoomFilling(roomTemplate); filler.SetSquareUnwalkable(new Point(3, 2)); Assert.IsTrue(filler.Connected); }
public void CompletelyBlockingDoorwayUsingCheckAndSetFunctionFails() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testrouting.room"); //8x4 var filler = new RoomFilling(roomTemplate); filler.SetSquareUnWalkableIfMaintainsConnectivity(new Point(1, 1)); Assert.IsFalse(filler.SetSquareUnWalkableIfMaintainsConnectivity(new Point(1, 2))); }
public void CompletelyBlockingOffADoorwayFails() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testrouting.room"); //8x4 var filler = new RoomFilling(roomTemplate); filler.SetSquareUnwalkable(new Point(1, 1)); filler.SetSquareUnwalkable(new Point(1, 2)); filler.SetSquareUnwalkable(new Point(1, 3)); Assert.IsFalse(filler.Connected); }
public void DividingRoomIntoTwoBreakingSomeConnectionsButLeavingAllDoorsWithOneRouteFails() { RoomTemplate roomTemplate = LoadTemplateFromAssemblyFile("DDRogueTest.testdata.vaults.testrouting.room"); //8x4 var filler = new RoomFilling(roomTemplate); filler.SetSquareUnwalkable(new Point(4, 1)); filler.SetSquareUnwalkable(new Point(4, 2)); filler.SetSquareUnwalkable(new Point(3, 2)); filler.SetSquareUnwalkable(new Point(2, 2)); filler.SetSquareUnwalkable(new Point(2, 1)); Assert.IsFalse(filler.Connected); }