diff --git a/GenerateurSudoku.class b/GenerateurSudoku.class index d9f681a..baf4bc2 100644 Binary files a/GenerateurSudoku.class and b/GenerateurSudoku.class differ diff --git a/GrilleSudokuDessin.class b/GrilleSudokuDessin.class index 1ef653f..28cb06b 100644 Binary files a/GrilleSudokuDessin.class and b/GrilleSudokuDessin.class differ diff --git a/Grilles.class b/Grilles.class index 10ec0fe..18560e4 100644 Binary files a/Grilles.class and b/Grilles.class differ diff --git a/Lecteur.class b/Lecteur.class new file mode 100644 index 0000000..ecbf45f Binary files /dev/null and b/Lecteur.class differ diff --git a/Lecteur.java b/Lecteur.java new file mode 100644 index 0000000..6b3495f --- /dev/null +++ b/Lecteur.java @@ -0,0 +1,45 @@ +import javax.swing.*; +import java.awt.*; +import java.io.*; +import javax.swing.filechooser.FileNameExtensionFilter; + +public class Lecteur{ + public static void lecture(String name, int [][] g) { + + int valeur[] = new int[9]; + int valeur_en_fin[][]= new int[9][9]; + + int valeur_actuelle=0; + + try{ + FileInputStream fichier = new FileInputStream(name); + DataInputStream flux = new DataInputStream(fichier); + + try{ + for(int i=0; i<9; i++){ + valeur[i]=flux.readInt(); + System.out.print(valeur[i]); + } + flux.close(); + }catch(IOException e){ + System.out.println("Lecture fichier impossible"); + } + }catch(FileNotFoundException e){ + System.out.println("Fichier non trouvé"); + } + + for(int i=0; i<9; i++){ + for(int j=8; j>=0; j--){ + valeur_actuelle=valeur[i]; + + valeur_actuelle=valeur_actuelle%10; + valeur[i]=(valeur[i]-valeur_actuelle)/10; + + valeur_en_fin[i][j]=valeur_actuelle; + System.out.print(valeur_actuelle); + g[i][j] = valeur_actuelle; + } + valeur_actuelle=0; + } + } +} \ No newline at end of file diff --git a/Main$1.class b/Main$1.class index 4d464fe..4b9c11b 100644 Binary files a/Main$1.class and b/Main$1.class differ diff --git a/Main$2.class b/Main$2.class index b37841e..83fe023 100644 Binary files a/Main$2.class and b/Main$2.class differ diff --git a/Main$3.class b/Main$3.class index 39cf51e..5b13b1c 100644 Binary files a/Main$3.class and b/Main$3.class differ diff --git a/Main.class b/Main.class index 63486a8..767f63c 100644 Binary files a/Main.class and b/Main.class differ diff --git a/MainCreation$1.class b/MainCreation$1.class index 8765306..8f193d8 100644 Binary files a/MainCreation$1.class and b/MainCreation$1.class differ diff --git a/MainCreation$2.class b/MainCreation$2.class index 2cf0aa6..faeddb9 100644 Binary files a/MainCreation$2.class and b/MainCreation$2.class differ diff --git a/MainCreation$3.class b/MainCreation$3.class index 2c18949..b1c9365 100644 Binary files a/MainCreation$3.class and b/MainCreation$3.class differ diff --git a/MainCreation.class b/MainCreation.class index 15c4b61..fa2cb3f 100644 Binary files a/MainCreation.class and b/MainCreation.class differ diff --git a/MainCreation.java b/MainCreation.java index 1931fc8..e6d4904 100644 --- a/MainCreation.java +++ b/MainCreation.java @@ -55,7 +55,8 @@ public class MainCreation { JPanel panneau = new JPanel(); int valeur_de_retour = fichier.showOpenDialog(panneau); if(valeur_de_retour == JFileChooser.APPROVE_OPTION) { - //Grilles.grilleExiste(fichier.getSelectedFile().getName()); + Lecteur.lecture(fichier.getSelectedFile().getName(), grille); + fenetreModification(grille); } } }); diff --git a/OuvertureFichier.class b/OuvertureFichier.class index b55b9a2..039a049 100644 Binary files a/OuvertureFichier.class and b/OuvertureFichier.class differ diff --git a/Register.class b/Register.class index d9d2ec3..79d8696 100644 Binary files a/Register.class and b/Register.class differ diff --git a/Reinitialiser.class b/Reinitialiser.class index 2b9d807..7a9179d 100644 Binary files a/Reinitialiser.class and b/Reinitialiser.class differ diff --git a/Resolveur.class b/Resolveur.class index fe239e3..c039556 100644 Binary files a/Resolveur.class and b/Resolveur.class differ diff --git a/SaisieGrille$1.class b/SaisieGrille$1.class index 5ad4860..9c9ec60 100644 Binary files a/SaisieGrille$1.class and b/SaisieGrille$1.class differ diff --git a/SaisieGrille.class b/SaisieGrille.class index 3a5691e..967baf3 100644 Binary files a/SaisieGrille.class and b/SaisieGrille.class differ diff --git a/SudokuGenerator.class b/SudokuGenerator.class index 682e770..c8d4474 100644 Binary files a/SudokuGenerator.class and b/SudokuGenerator.class differ