Correction de petit bug de var non utilisées
This commit is contained in:
parent
f7c5974019
commit
2d1ba67c4c
@ -16,17 +16,11 @@ public class AlgoAlea {
|
|||||||
|
|
||||||
private JFrame cetteFrame;
|
private JFrame cetteFrame;
|
||||||
|
|
||||||
public AlgoAlea(int uneTaille, boolean[][] tableau, Cellules[][] uneGrille, int visuel, JFrame uneFrame) {
|
public AlgoAlea(int uneTaille, boolean[][] tableau, Cellules[][] uneGrille, JFrame uneFrame) {
|
||||||
this.map = tableau;
|
this.map = tableau;
|
||||||
this.grille = uneGrille;
|
this.grille = uneGrille;
|
||||||
this.cetteFrame = uneFrame;
|
this.cetteFrame = uneFrame;
|
||||||
this.cetteTaille = uneTaille;
|
this.cetteTaille = uneTaille;
|
||||||
|
|
||||||
if(visuel==0){
|
|
||||||
this.auto();
|
|
||||||
} else if(visuel==1){
|
|
||||||
this.manuel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================================== AUtomatique ==================================== */
|
/* ==================================== AUtomatique ==================================== */
|
||||||
|
@ -2,7 +2,6 @@ import java.awt.event.KeyEvent;
|
|||||||
import java.awt.event.KeyListener;
|
import java.awt.event.KeyListener;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
|
||||||
|
|
||||||
public class Attente implements KeyListener {
|
public class Attente implements KeyListener {
|
||||||
public static final boolean FINI = true;
|
public static final boolean FINI = true;
|
||||||
|
@ -29,7 +29,8 @@ public class GestionChoixAlgo extends JFrame implements ActionListener {
|
|||||||
if(this.ceGroupe0.getSelection().getActionCommand()=="Aalea" && this.ceGroupe1.getSelection().getActionCommand()=="Vauto")
|
if(this.ceGroupe0.getSelection().getActionCommand()=="Aalea" && this.ceGroupe1.getSelection().getActionCommand()=="Vauto")
|
||||||
{
|
{
|
||||||
this.frameGrille.dispose();
|
this.frameGrille.dispose();
|
||||||
AlgoAlea algorithme = new AlgoAlea(this.cetteTaille, this.cetteGrille, this.cetteGrilleCell, 0, null);
|
AlgoAlea algorithme = new AlgoAlea(this.cetteTaille, this.cetteGrille, this.cetteGrilleCell, null);
|
||||||
|
algorithme.auto();
|
||||||
}
|
}
|
||||||
else if(this.ceGroupe0.getSelection().getActionCommand()=="Adeter" && this.ceGroupe1.getSelection().getActionCommand()=="Vauto")
|
else if(this.ceGroupe0.getSelection().getActionCommand()=="Adeter" && this.ceGroupe1.getSelection().getActionCommand()=="Vauto")
|
||||||
{
|
{
|
||||||
@ -37,7 +38,8 @@ public class GestionChoixAlgo extends JFrame implements ActionListener {
|
|||||||
}
|
}
|
||||||
else if(this.ceGroupe0.getSelection().getActionCommand()=="Aalea" && this.ceGroupe1.getSelection().getActionCommand()=="Vman")
|
else if(this.ceGroupe0.getSelection().getActionCommand()=="Aalea" && this.ceGroupe1.getSelection().getActionCommand()=="Vman")
|
||||||
{
|
{
|
||||||
AlgoAlea algorithme = new AlgoAlea(this.cetteTaille, this.cetteGrille, this.cetteGrilleCell, 1, this.frameGrille);
|
AlgoAlea algorithme = new AlgoAlea(this.cetteTaille, this.cetteGrille, this.cetteGrilleCell, this.frameGrille);
|
||||||
|
algorithme.manuel();
|
||||||
}
|
}
|
||||||
else if(this.ceGroupe0.getSelection().getActionCommand()=="Adeter" && this.ceGroupe1.getSelection().getActionCommand()=="Vman")
|
else if(this.ceGroupe0.getSelection().getActionCommand()=="Adeter" && this.ceGroupe1.getSelection().getActionCommand()=="Vman")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user