Skip to content
Snippets Groups Projects
Commit 5fa48509 authored by HydroFlo's avatar HydroFlo
Browse files

mob rando

parent d5ab4f36
No related branches found
No related tags found
No related merge requests found
No preview for this file type
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@......................................................................@ @......................................................................@
@...................................M..................................@ @......................................................................@
@......................................................................@ @......................................................................@
@......................................................................@ @......................................................................@
@......................................................................@ @......................................................................@
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@......................................................................@ @......................................................................@
@......................................................................@ @......................................................................@
@S....................................................................S@ @S....................................................................S@
@S..................................M.................................S@ @S....................................................................S@
@......................................................................@ @......................................................................@
@......................................................................@ @......................................................................@
@......................................................................@ @......................................................................@
......
...@@ -603,6 +603,7 @@ class Labyrinthe extends Program{ ...@@ -603,6 +603,7 @@ class Labyrinthe extends Program{
int[] indiceSalle = new int[]{0,0}; int[] indiceSalle = new int[]{0,0};
char[][] salle = genererSalle("ressources/Lab/Salle"+lab[indiceSalle[0]][indiceSalle[1]].numero); char[][] salle = genererSalle("ressources/Lab/Salle"+lab[indiceSalle[0]][indiceSalle[1]].numero);
Question q = newQuestion("Quelle est la capital de la France", "paris"); Question q = newQuestion("Quelle est la capital de la France", "paris");
int rando = (int) (random() * 3)+1;
afficherSalle(lab[1][0].numero); afficherSalle(lab[1][0].numero);
salle[length(salle,1)/2][length(salle,2)/2] = 'P'; salle[length(salle,1)/2][length(salle,2)/2] = 'P';
afficheStringTab(load("ressources/score.csv")); afficheStringTab(load("ressources/score.csv"));
...@@ -617,9 +618,14 @@ class Labyrinthe extends Program{ ...@@ -617,9 +618,14 @@ class Labyrinthe extends Program{
if(!equals(indiceSalleActu, indiceSalle)){ if(!equals(indiceSalleActu, indiceSalle)){
salle = genererSalle("ressources/Lab/Salle"+lab[indiceSalle[0]][indiceSalle[1]].numero); salle = genererSalle("ressources/Lab/Salle"+lab[indiceSalle[0]][indiceSalle[1]].numero);
salle[indiceP[0]][indiceP[1]] = 'P'; salle[indiceP[0]][indiceP[1]] = 'P';
} if(indiceSalle[0] == length(lab)/2 && indiceSalle[1] == length(lab)/2){
if(indiceSalle[0] == length(lab)/2 && indiceSalle[1] == length(lab)/2){ salle[length(salle, 1)/2][length(salle,2)/2] = 'B';
salle[length(salle, 1)/2][length(salle,2)/2] = 'B'; } else {
if (rando == 1){
salle[length(salle, 1)/2][length(salle,2)/2] = 'M';
}
rando = (int) (random() * 3) + 1;
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment