Skip to content
Snippets Groups Projects
Unverified Commit ee5f72ae authored by Alexandre 2n's avatar Alexandre 2n Committed by GitHub
Browse files

generation

parent 5d6282dc
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,10 @@ class Labyrinthe extends Program{ ...@@ -144,7 +144,10 @@ class Labyrinthe extends Program{
String choixAlea(String chaine){ String choixAlea(String chaine){
for(int a = 0; a<4;a++){ for(int a = 0; a<4;a++){
if(charAt(chaine,a)=='.'||charAt(chaine,a)=='E'){ if(charAt(chaine,a)=='E'){
chaine=substring(chaine,0,a)+0+substring(chaine,a+1,length(chaine));
}
if(charAt(chaine,a)=='.'){
chaine=substring(chaine,0,a)+(int)(random()*2)+substring(chaine,a+1,length(chaine)); chaine=substring(chaine,0,a)+(int)(random()*2)+substring(chaine,a+1,length(chaine));
} }
} }
...@@ -407,6 +410,7 @@ class Labyrinthe extends Program{ ...@@ -407,6 +410,7 @@ class Labyrinthe extends Program{
if(tab[i][j] == c){ if(tab[i][j] == c){
return new int[]{i,j}; return new int[]{i,j};
} }
println();
} }
} }
return new int[]{0,0}; return new int[]{0,0};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment