Verified Commit 63a20552 authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Use mother class function

parent 2561d8ae
......@@ -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 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment