Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Romain De Laage De Bellefaye
LO21-projet
Commits
63a20552
Verified
Commit
63a20552
authored
Jun 11, 2021
by
Romain De Laage De Bellefaye
🌳
Browse files
Use mother class function
parent
2561d8ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Fonction.cpp
View file @
63a20552
...
...
@@ -4,24 +4,7 @@ bool RegleAvecEtatCourant::verify(const Voisinage& voisins, const Cellule& cellu
if
(
cellule
.
getIndEtat
()
!=
etatCourant
)
return
false
;
int
nb
[
8
]
=
{
0
};
auto
*
cellules
=
voisins
.
creerIterator
();
cellules
->
first
();
while
(
!
cellules
->
isDone
())
{
nb
[
cellules
->
currentItem
()
->
getIndEtat
()]
++
;
cellules
->
next
();
}
delete
cellules
;
for
(
int
i
=
0
;
i
<
8
;
++
i
)
if
((
seuilsMin
[
i
]
!=
-
1
&&
nb
[
i
]
<
seuilsMin
[
i
])
||
(
seuilsMax
[
i
]
!=
-
1
&&
nb
[
i
]
>
seuilsMax
[
i
]))
return
false
;
return
true
;
return
Regle
::
verify
(
voisins
,
cellule
);
}
bool
Regle
::
verify
(
const
Voisinage
&
voisins
,
const
Cellule
&
cellule
)
const
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment