public void ProcessMap_RemoveAllDeadEnds_AllDeadEndsRemoved() { var map = new Map<BinaryCell>(SOME_WIDTH, SOME_HEIGHT); var mazeGenerator = new MazeGenerator<BinaryCell>(); mazeGenerator.ProcessMap(map, mConfiguration, mRandomizer); var sparsenessReducer = new SparsenessReducer<BinaryCell>(); sparsenessReducer.ProcessMap(map, mConfiguration, mRandomizer); var remover = new DeadendsRemover<BinaryCell>(); remover.ProcessMap(map, mConfiguration, mRandomizer); Assert.AreEqual(0, map.AllCells.Count(cell => cell.Sides.Values.Count(type => type) == 1)); }
public void ProcessMap_RemoveAllDeadEnds_AllDeadEndsRemoved() { var map = new Map <BinaryCell>(SOME_WIDTH, SOME_HEIGHT); var mazeGenerator = new MazeGenerator <BinaryCell>(); mazeGenerator.ProcessMap(map, mConfiguration, mRandomizer); var sparsenessReducer = new SparsenessReducer <BinaryCell>(); sparsenessReducer.ProcessMap(map, mConfiguration, mRandomizer); var remover = new DeadendsRemover <BinaryCell>(); remover.ProcessMap(map, mConfiguration, mRandomizer); Assert.AreEqual(0, map.AllCells.Count(cell => cell.Sides.Values.Count(type => type) == 1)); }