21 lines
567 B
Java
21 lines
567 B
Java
|
import javax.swing.*;
|
||
|
|
||
|
public class GenerateurSudoku {
|
||
|
public static int[][] genererGrille() {
|
||
|
// grille par défaut
|
||
|
int[][] grille = {
|
||
|
{0, 0, 0, 0, 9, 5, 0, 0, 4},
|
||
|
{5, 3, 0, 4, 0, 8, 7, 0, 2},
|
||
|
{0, 0, 0, 7, 0, 0, 6, 0, 3},
|
||
|
{9, 0, 0, 0, 3, 4, 0, 8, 0},
|
||
|
{0, 4, 0, 0, 1, 0, 0, 7, 0},
|
||
|
{0, 2, 0, 5, 7, 0, 0, 0, 6},
|
||
|
{4, 0, 9, 0, 0, 2, 0, 0, 0},
|
||
|
{6, 0, 7, 9, 0, 3, 0, 2, 1},
|
||
|
{2, 0, 0, 6, 5, 0, 0, 0, 0}
|
||
|
};
|
||
|
|
||
|
return grille;
|
||
|
}
|
||
|
}
|