public void TestGreaterThanFourYAxis() { var matrix = GetTileMatrix(4); matrix[2, 17].OnPath = true; matrix[4, 18].OnPath = true; matrix[6, 19].OnPath = true; var guardTileLogic = new GuardTileLogic(4, matrixSize(4), 3); guardTileLogic.GetMaxExitCount(3); guardTileLogic.GetPotentialGuardPlaces(matrix); Assert.AreEqual(true, guardTileLogic.GuardPlacesAreAvailable()); }
public void TestJustRightAmountOfAvailableTiles() { var matrix = GetTileMatrix(3); matrix[2, 15].OnPath = true; matrix[4, 15].OnPath = true; matrix[8, 15].OnPath = true; var guardTileLogic = new GuardTileLogic(3, matrixSize(3), 3); guardTileLogic.GetMaxExitCount(3); guardTileLogic.GetPotentialGuardPlaces(matrix); Assert.AreEqual(true, guardTileLogic.GuardPlacesAreAvailable()); }
public void TestSetGuardTiles() { var matrix = GetTileMatrix(4); matrix[2, 17].OnPath = true; matrix[4, 18].OnPath = true; matrix[6, 19].OnPath = true; var guardTileLogic = new GuardTileLogic(4, matrixSize(4), 3); guardTileLogic.GetMaxExitCount(4); guardTileLogic.GetPotentialGuardPlaces(matrix); guardTileLogic.SetGuardTiles(); Assert.AreEqual(true, matrix[2, 17].HasGuard); Assert.AreEqual(true, matrix[4, 18].HasGuard); Assert.AreEqual(true, matrix[6, 19].HasGuard); }