diff --git a/S1.02/Jeu/classes/Labyrinthe.class b/S1.02/Jeu/classes/Labyrinthe.class index 806b734ccd2472789a57862f7796915d601f3e1e..600b6815ac36f7cb5d1a9fd3695521727731bedb 100644 Binary files a/S1.02/Jeu/classes/Labyrinthe.class and b/S1.02/Jeu/classes/Labyrinthe.class differ diff --git a/S1.02/Jeu/ressources/img/Score.txt b/S1.02/Jeu/ressources/img/Score.txt index a5057f23e486cb63c6aee42d60b80dd5d23bfdfd..2725b4d37330901568aa279bb60439bd6a793b61 100644 --- a/S1.02/Jeu/ressources/img/Score.txt +++ b/S1.02/Jeu/ressources/img/Score.txt @@ -1,6 +1,6 @@ ################################################################################ ####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#### -#### ____ #### +####@ ____ @#### #### / ___| ___ ___ _ __ ___ #### #### \___ \ / __/ _ \| '__/ _ \ #### #### ___) | (_| (_) | | | __/ #### @@ -9,4 +9,5 @@ #### #### #### #### #### Pseudo : Score : #### +#### #### \ No newline at end of file diff --git a/S1.02/Jeu/ressources/score.csv b/S1.02/Jeu/ressources/score.csv index 66c06e6fdd9c4428536c80169dfe982c3dc2af17..3c1fa638a682645b1eb32b010a31c884d2390afc 100644 --- a/S1.02/Jeu/ressources/score.csv +++ b/S1.02/Jeu/ressources/score.csv @@ -1,7 +1,7 @@ Pseudo,Score +j,91 Hydro,38 Alex,37 Bob,37 Testeur,34 Test,32 -Cheh,31 diff --git a/S1.02/Jeu/src/Labyrinthe.java b/S1.02/Jeu/src/Labyrinthe.java index 56a96836032506260008009993a3f390bcb56d65..5383b79257c6cd0d7b55bfc8be73b14861a79cd8 100644 --- a/S1.02/Jeu/src/Labyrinthe.java +++ b/S1.02/Jeu/src/Labyrinthe.java @@ -84,7 +84,7 @@ class Labyrinthe extends Program{ String choix; do{ choix = toLowerCase(readString()); - }while(length(choix) != 1 && length(choix) != 2); + }while(length(choix) != 1 && length(choix) != 2 ); return choix; } @@ -267,7 +267,7 @@ class Labyrinthe extends Program{ } else { j.vie -= 10; } - } else if(Lab[positionL-1][positionC] == 'B'){ //Si Monstre, affiche la question. + } else if(Lab[positionL-1][positionC] == 'B' && !j.bossVaincu){ //Si Monstre, affiche la question. Question q = questionRandom(listeBoss, 0); afficheQuestion(q, true); if(questionCorrect(q)){ //En cas de bonne réponse efface le monstre @@ -296,7 +296,7 @@ class Labyrinthe extends Program{ } else { j.vie -= 10; } - } else if(Lab[positionL+1][positionC] == 'B'){ //Si Monstre, affiche la question. + } else if(Lab[positionL+1][positionC] == 'B' && !j.bossVaincu){ //Si Monstre, affiche la question. Question q = questionRandom(listeBoss, 0); afficheQuestion(q, true); if(questionCorrect(q)){ //En cas de bonne réponse efface le monstre @@ -325,7 +325,7 @@ class Labyrinthe extends Program{ } else { j.vie -= 10; } - } else if(Lab[positionL][positionC-1] == 'B'){ //Si Monstre, affiche la question. + } else if(Lab[positionL][positionC-1] == 'B' && !j.bossVaincu){ //Si Monstre, affiche la question. Question q = questionRandom(listeBoss, 0); afficheQuestion(q, true); if(questionCorrect(q)){ //En cas de bonne réponse efface le monstre @@ -354,7 +354,7 @@ class Labyrinthe extends Program{ } else { j.vie -= 10; } - } else if(Lab[positionL][positionC+1] == 'B'){ //Si Monstre, affiche la question. + } else if(Lab[positionL][positionC+1] == 'B' && !j.bossVaincu){ //Si Monstre, affiche la question. Question q = questionRandom(listeBoss, 0); afficheQuestion(q, true); if(questionCorrect(q)){ //En cas de bonne réponse efface le monstre @@ -493,6 +493,7 @@ class Labyrinthe extends Program{ } println("#### " + file[i][0] + vide + file[i][1] + " ####"); } + println(readFile("ressources/img/fermeEntete.txt", true)); } Question[] listeQuestion(String cheminFichier){ //Charge le csv des question et renvoie un tableau de question qui possède une Question par case @@ -686,7 +687,7 @@ class Labyrinthe extends Program{ int[] indiceP = indiceDe('P', salle); String choix = controleSaisie(); int nbMove = 1; - if(length(choix) == 2){ + if(length(choix) == 2 && estInt(substring(choix,1,2))){ nbMove = charToInt(charAt(choix,1)); } for(int i = 0; i < nbMove; i ++){