public bool IsMagicSquare(int[][] square, int sum) { var HorizontalsState = IsValid(square, sum); if (NotLastDirection(HorizontalsState)) { _nextDirection.IsMagicSquare(square, sum); } return(HorizontalsState); }
public bool IsMagicSquare(int[][] square, int sum) { var diagonals = GetDiagonals(square); var DiagonalsState = IsValid(diagonals, sum); if (NotLastDirection(DiagonalsState)) { _nextDirection.IsMagicSquare(square, sum); } return(DiagonalsState); }
public bool IsMagicSquare(int[][] square, int sum) { var verticals = GetVerticals(square); var VerticalsState = IsValid(verticals, sum); if (NotLastDirection(VerticalsState)) { _nextDirection.IsMagicSquare(square, sum); } return(VerticalsState); }