resolution bug suite au changement de la grille

This commit is contained in:
Wilfried BRIGITTE 2024-04-27 12:34:40 +02:00
parent fba852a140
commit 8436d97168
3 changed files with 7 additions and 24 deletions

View File

@ -8,13 +8,13 @@ JVMFLAGS =
### REGLES ESSENTIELLES ###
main.class : mainProgramme2.java menuProgramme2.class
mainProgramme2.class : mainProgramme2.java menuProgramme2.class
${JC} ${JCFLAGS} main.java
grille.class : grille.java resolveurGrille.class
${JC} ${JCFLAGS} grille.java
menu.class : menuProgramme2.java resolveurGrille.class grille.class
menuProgramme2.class : menuProgramme2.java resolveurGrille.class grille.class
${JC} ${JCFLAGS} menu.java
resolveurGrille.class : resolveurGrille.java
@ -23,7 +23,7 @@ resolveurGrille.class : resolveurGrille.java
### REGLES OPTIONNELLES ###
run : mainProgramme2.class
${JVM} ${JVMFLAGS} main
${JVM} ${JVMFLAGS} mainProgramme2
clean :
-rm -f *.class

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Sudoku</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -81,13 +81,13 @@ public class grille extends JComponent{
case_depart[ligne][col].setFont(new Font("Arial", Font.PLAIN, 30));
case_depart[ligne][col].setHorizontalAlignment(JTextField.CENTER);
if ((ligne % 3 == 0) && (ligne != 0)){
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(5,2,2,2,Color.BLACK));
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(5,2,2,2,Color.BLACK));
} else if ((col % 3 == 0) && (col != 0)){
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(2,5,2,2,Color.BLACK));
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(2,5,2,2,Color.BLACK));
} else if ((ligne % 3 == 0) && (ligne != 0) && (col % 3 == 0) && (col != 0)){
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(5,5,2,2,Color.BLACK));
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(5,5,2,2,Color.BLACK));
} else {
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(2,2,2,2,Color.BLACK));
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(2,2,2,2,Color.BLACK));
}
place_grille.add(case_depart[ligne][col]);
}