Skip to content
Snippets Groups Projects
Commit 24b251d5 authored by HydroFlo's avatar HydroFlo
Browse files

affichage moche des scores

parent f1f7fa4f
Branches
No related tags found
No related merge requests found
No preview for this file type
################################################################################
################################################################################
#### ####
#### Labyrinthe ####
#### ####
#### ####
#### Jeu par Gambirasio Florian et Dehaine Alexandre ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### press enter to start ####
#### ####
################################################################################
################################################################################
...@@ -396,7 +396,7 @@ class Labyrinthe extends Program{ ...@@ -396,7 +396,7 @@ class Labyrinthe extends Program{
assertEquals(verif, formatIntituler(test, 48, 12)); assertEquals(verif, formatIntituler(test, 48, 12));
} }
void afficheIntituler(String intituler){ //prend une chaine et l'affiche selon la forme d'affichage des question (voir ressource) void afficheIntituler(String intituler){ //prend une chaine et l'affiche selon la forme d'affichage des question (voir ressources)
print(" "); print(" ");
for(int i = 0; i < length(intituler); i ++){ for(int i = 0; i < length(intituler); i ++){
print(charAt(intituler, i)); print(charAt(intituler, i));
...@@ -487,6 +487,17 @@ class Labyrinthe extends Program{ ...@@ -487,6 +487,17 @@ class Labyrinthe extends Program{
} }
void afficheScore(){
String[][] file = load("ressources/score.csv");
for(int i = 1; i < length(file,1); i ++){
print(" ");
for(int j = 0; j < length(file,2); j ++){
print(file[i][j] + " ");
}
println();
}
}
Question[] listeQuestion(String cheminFichier){ //Charge le csv des question et renvoie un tableau de question qui possède une Question par case Question[] listeQuestion(String cheminFichier){ //Charge le csv des question et renvoie un tableau de question qui possède une Question par case
String[][] lQuestion = load(cheminFichier); String[][] lQuestion = load(cheminFichier);
Question[] res = new Question[length(lQuestion, 1)-1]; Question[] res = new Question[length(lQuestion, 1)-1];
...@@ -706,5 +717,8 @@ class Labyrinthe extends Program{ ...@@ -706,5 +717,8 @@ class Labyrinthe extends Program{
print(readFile("ressources/img/Lose.txt", true)); print(readFile("ressources/img/Lose.txt", true));
} }
ajoutScore(tabScore, joueur.pseudo, joueur.score); ajoutScore(tabScore, joueur.pseudo, joueur.score);
if(equals(toLowerCase(readString()), "s")){
afficheScore();
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment