Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JDR_CPOA
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
LOI Leo
JDR_CPOA
Commits
5444b3f6
Commit
5444b3f6
authored
1 year ago
by
LOI Leo
Browse files
Options
Downloads
Patches
Plain Diff
changement dans SorcierVisiteur
parent
2dc28b3b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/SorcierVisiteur.java
+4
-2
4 additions, 2 deletions
src/SorcierVisiteur.java
with
4 additions
and
2 deletions
src/SorcierVisiteur.java
+
4
−
2
View file @
5444b3f6
import
java.util.Objects
;
public
class
SorcierVisiteur
implements
Visiteur
{
public
class
SorcierVisiteur
implements
Visiteur
{
@Override
@Override
public
int
visiter
(
Personnage
p
)
{
public
int
visiter
(
Personnage
p
)
{
if
(
p
.
getIsWhat
()
==
"Sorcier"
){
if
(
Objects
.
equals
(
p
.
getIsWhat
()
,
"Sorcier"
)
)
{
return
1
;
return
1
;
}
else
{
}
else
{
return
0
;
return
0
;
...
@@ -12,7 +14,7 @@ public class SorcierVisiteur implements Visiteur{
...
@@ -12,7 +14,7 @@ public class SorcierVisiteur implements Visiteur{
public
int
visiter
(
Equipe
e
)
{
public
int
visiter
(
Equipe
e
)
{
int
cpt
=
0
;
int
cpt
=
0
;
for
(
Personnage
p:
e
.
equipe
)
{
for
(
Personnage
p:
e
.
equipe
)
{
if
(
p
.
getIsWhat
()
==
"Sorcier"
){
if
(
Objects
.
equals
(
p
.
getIsWhat
()
,
"Sorcier"
)
)
{
cpt
++;
cpt
++;
}
}
}
}
...
...
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