public void IsBorderCellTest(int maxY, int maxX, int cellIndex, WallIndex wallIndex, bool expectedResult) { // Arrange MazeShaperZ shaper = new MazeShaperZ(maxY, maxX); // Act bool result = false; if (wallIndex == WallIndex.NorthWall) { result = shaper.IsNorthBorderCell(cellIndex); } if (wallIndex == WallIndex.EastWall) { result = shaper.IsEastBorderCell(cellIndex); } if (wallIndex == WallIndex.SouthWall) { result = shaper.IsSouthBorderCell(cellIndex); } if (wallIndex == WallIndex.WestWall) { result = shaper.IsWestBorderCell(cellIndex); } // Assert Assert.That(expectedResult, Is.EqualTo(result)); }
public void FindAdjacentCellTest(int maxY, int maxX, int cellIndex, WallIndex wallIndex, int expected) { // Arrange MazeShaperZ shaper = new MazeShaperZ(maxY, maxX); // Act int adjacentResult = shaper.FindAdjacentCellIndex(cellIndex, wallIndex); // Assert Assert.That(adjacentResult, Is.EqualTo(expected)); }
void Awake() { _mazeCells = new List <MazeCellZBehaviour>(); _mazeShaper = new MazeShaperZ(_numberOfCellsNorth, _numberOfCellsEast); }