// Puzzle facile : 30 indices donnes.
int[][] puzzle_facile = new int[][] {
new int[] {5, 3, 0, 0, 7, 0, 0, 0, 0},
new int[] {6, 0, 0, 1, 9, 5, 0, 0, 0},
new int[] {0, 9, 8, 0, 0, 0, 0, 6, 0},
new int[] {8, 0, 0, 0, 6, 0, 0, 0, 3},
new int[] {4, 0, 0, 8, 0, 3, 0, 0, 1},
new int[] {7, 0, 0, 0, 2, 0, 0, 0, 6},
new int[] {0, 6, 0, 0, 0, 0, 2, 8, 0},
new int[] {0, 0, 0, 4, 1, 9, 0, 0, 5},
new int[] {0, 0, 0, 0, 8, 0, 0, 7, 9},
};
// Puzzle intermediaire : 36 indices donnes.
int[][] puzzle_intermediaire = new int[][] {
new int[] {0, 0, 0, 2, 6, 0, 7, 0, 1},
new int[] {6, 8, 0, 0, 7, 0, 0, 9, 0},
new int[] {1, 9, 0, 0, 0, 4, 5, 0, 0},
new int[] {8, 2, 0, 1, 0, 0, 0, 4, 0},
new int[] {0, 0, 4, 6, 0, 2, 9, 0, 0},
new int[] {0, 5, 0, 0, 0, 3, 0, 2, 8},
new int[] {0, 0, 9, 3, 0, 0, 0, 7, 4},
new int[] {0, 4, 0, 0, 5, 0, 0, 3, 6},
new int[] {7, 0, 3, 0, 1, 8, 0, 0, 0},
};
int CompterIndices(int[][] g) {
int n = 0;
for (int r = 0; r < 9; r++) for (int c = 0; c < 9; c++) if (g[r][c] != 0) n++;
return n;
}
Console.WriteLine("Puzzle facile : " + CompterIndices(puzzle_facile) + " indices donnes");
Console.WriteLine("Puzzle intermediaire : " + CompterIndices(puzzle_intermediaire) + " indices donnes");