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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Gambirasio
Labyrinthe-Perdu
Commits
5d6282dc
Commit
5d6282dc
authored
1 year ago
by
HydroFlo
Browse files
Options
Downloads
Patches
Plain Diff
Affichage fichier help
parent
8e91b6f6
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
S1.02/Jeu/classes/Labyrinthe.class
+0
-0
0 additions, 0 deletions
S1.02/Jeu/classes/Labyrinthe.class
S1.02/Jeu/ressources/img/Help
+2
-0
2 additions, 0 deletions
S1.02/Jeu/ressources/img/Help
S1.02/Jeu/src/Labyrinthe.java
+15
-4
15 additions, 4 deletions
S1.02/Jeu/src/Labyrinthe.java
with
17 additions
and
4 deletions
S1.02/Jeu/classes/Labyrinthe.class
+
0
−
0
View file @
5d6282dc
No preview for this file type
This diff is collapsed.
Click to expand it.
S1.02/Jeu/ressources/img/Help
+
2
−
0
View file @
5d6282dc
################################################################################
################################################################################
#### ####
#### Contrôle : ####
#### ####
...
...
@@ -17,3 +18,4 @@
#### 🏠 = Magasin (actuellement indisponible) ####
#### ####
################################################################################
################################################################################
\ No newline at end of file
This diff is collapsed.
Click to expand it.
S1.02/Jeu/src/Labyrinthe.java
+
15
−
4
View file @
5d6282dc
...
...
@@ -78,7 +78,7 @@ class Labyrinthe extends Program{
char
controleSaisie
(){
// verifie que l'utilisateur saisisse bien 1 caractere
String
choix
;
do
{
choix
=
readString
();
choix
=
toLowerCase
(
readString
()
)
;
}
while
(
length
(
choix
)!=
1
);
return
charAt
(
choix
,
0
);
}
...
...
@@ -165,7 +165,18 @@ class Labyrinthe extends Program{
return
(
lab
);
}
void
afficheHelp
(){
print
(
readFile
(
"ressources/img/Help"
,
true
));
println
(
"A tout moment dans la partie, appuyer sur \"H\" pour réafficher ce menu"
);
println
();
readString
();
}
int
[]
deplacement
(
char
[][]
Lab
,
char
direction
,
int
positionL
,
int
positionC
,
Joueur
j
){
//vérifie si déplacement possible, si oui l'effectue
if
(
direction
==
'h'
){
afficheHelp
();
}
if
(
direction
==
'z'
&&
positionL
-
1
>=
0
&&
Lab
[
positionL
-
1
][
positionC
]
!=
'@'
){
//déplacement haut
if
(
Lab
[
positionL
-
1
][
positionC
]
==
'.'
){
//déplacement si case vide
Lab
[
positionL
][
positionC
]
=
'.'
;
...
...
@@ -428,9 +439,9 @@ class Labyrinthe extends Program{
print
(
readFile
(
"ressources/img/Presentation.txt"
,
true
));
lancer
=
readString
();
}
println
(
"Les controles du jeu sont : "
);
print
(
readFile
(
"ressources/img/Help"
,
true
)
);
println
(
"A tout moment dans la partie, appuyer sur \"H\" pour les réafficher"
);
afficheHelp
(
);
print
(
"Rentrez votre pseudo : "
);
String
pseudo
=
readString
();
Joueur
j
=
newJoueur
(
pseudo
);
//Création du joueur
...
...
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