Correction de petit bug de var non utilisées

This commit is contained in:
fauvet 2023-04-27 21:23:45 +02:00
parent f7c5974019
commit 2d1ba67c4c
3 changed files with 5 additions and 10 deletions

View File

@ -16,17 +16,11 @@ public class AlgoAlea {
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.grille = uneGrille;
this.cetteFrame = uneFrame;
this.cetteTaille = uneTaille;
if(visuel==0){
this.auto();
} else if(visuel==1){
this.manuel();
}
}
/* ==================================== AUtomatique ==================================== */

View File

@ -2,7 +2,6 @@ import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.Random;
import javax.swing.*;
import java.awt.*;
public class Attente implements KeyListener {
public static final boolean FINI = true;

View File

@ -29,7 +29,8 @@ public class GestionChoixAlgo extends JFrame implements ActionListener {
if(this.ceGroupe0.getSelection().getActionCommand()=="Aalea" && this.ceGroupe1.getSelection().getActionCommand()=="Vauto")
{
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")
{
@ -37,7 +38,8 @@ public class GestionChoixAlgo extends JFrame implements ActionListener {
}
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")
{