private static bool CalculateTerminal(int[] square) { for (int i = 0; i < square.Length; i++) if (i != square[i]) return false; return true; }