public void IsClosedIfHasAllTheWallsTest() { var cell = new Cell(); Assert.IsTrue(cell.HasWall(Direction.N)); Assert.IsTrue(cell.HasWall(Direction.E)); Assert.IsTrue(cell.HasWall(Direction.S)); Assert.IsTrue(cell.HasWall(Direction.W)); Assert.IsTrue(cell.IsClosed()); }
public void OnCarveOnDirectionOnlyThatWallDisapears() { var directions = new[] { Direction.N, Direction.E, Direction.W, Direction.S }; foreach (var direction in directions) { var carved = new Cell().Carve(direction); foreach (var testDirection in directions) { Assert.IsTrue(carved.HasWall(testDirection) == (direction != testDirection)); } } }