Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Labyrinthe-Perdu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Gambirasio
Labyrinthe-Perdu
Commits
3308e142
Commit
3308e142
authored
1 year ago
by
HydroFlo
Browse files
Options
Downloads
Patches
Plain Diff
ajout question boss
parent
35dd5176
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
S1.02/Jeu/classes/Labyrinthe.class
+0
-0
0 additions, 0 deletions
S1.02/Jeu/classes/Labyrinthe.class
S1.02/Jeu/src/Labyrinthe.java
+17
-9
17 additions, 9 deletions
S1.02/Jeu/src/Labyrinthe.java
with
17 additions
and
9 deletions
S1.02/Jeu/classes/Labyrinthe.class
+
0
−
0
View file @
3308e142
No preview for this file type
This diff is collapsed.
Click to expand it.
S1.02/Jeu/src/Labyrinthe.java
+
17
−
9
View file @
3308e142
...
...
@@ -622,19 +622,14 @@ class Labyrinthe extends Program{
return
nbAjout
;
}
void
algorithm
(){
println
(
"Quel taille voulez vous pour le labyrinthe (la taille sera en : N x N ) ?"
);
int
tailleLab
=
nbFromString
(
3
);
Salle
[][]
lab
=
genererLab
(
tailleLab
);
//genere le Layrinthe
String
[][]
questionTemp
=
load
(
"ressources/ListeQuestion.csv"
);
String
[][]
tabScore
=
load
(
"ressources/score.csv"
);
print
(
"Voulez vous ajouter des question ? oui (o), non (autre) : "
);
String
ques
=
readString
();
void
updateCSVQuestion
(
Salle
[][]
lab
,
String
cheminFichier
){
//ajoute des questions (si demandé) dans le fichier mis en paramètre
String
[][]
questionTemp
=
load
(
cheminFichier
);
String
ques
=
readString
();
if
(
equals
(
toLowerCase
(
ques
),
"o"
)){
print
(
"Combien voulez vous en ajouter ? : "
);
int
nbAjout
=
nbFromString
(
1
);
ajoutQuestion
(
questionTemp
,
nbAjout
);
questionTemp
=
load
(
"ressources/ListeQuestion.csv"
);
questionTemp
=
load
(
cheminFichier
);
afficheStringTab
(
questionTemp
);
}
else
if
(
equals
(
toLowerCase
(
ques
),
"p"
)){
for
(
int
i
=
0
;
i
<
length
(
lab
,
1
);
i
++){
...
...
@@ -643,6 +638,19 @@ class Labyrinthe extends Program{
}
}
}
}
void
algorithm
(){
println
(
"Quel taille voulez vous pour le labyrinthe (la taille sera en : N x N ) ?"
);
int
tailleLab
=
nbFromString
(
3
);
Salle
[][]
lab
=
genererLab
(
tailleLab
);
//genere le Layrinthe
String
[][]
tabScore
=
load
(
"ressources/score.csv"
);
print
(
"Voulez vous ajouter des questions pour les monstres ? oui (o), non (autre) : "
);
updateCSVQuestion
(
lab
,
"ressources/ListeQuestion.csv"
);
print
(
"Voulez vous ajouter des questions pour le Boss ? oui (o), non (autre) : "
);
updateCSVQuestion
(
lab
,
"ressources/ListeQuestionBoss.csv"
);
Question
[]
lQuestion
=
listeQuestion
(
"ressources/ListeQuestion.csv"
);
Question
[]
lQuestionBoss
=
listeQuestion
(
"ressources/ListeQuestionBoss.csv"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment