Commit d3935f7f authored by Victor Blanchet's avatar Victor Blanchet
Browse files

adding operator == for Reseau

parent fb38fd85
Pipeline #79722 passed with stage
in 16 seconds
......@@ -132,3 +132,11 @@ Reseau& Reseau::operator=(const Reseau& init_grille) {
return *this;
}
bool Reseau::operator==(const Reseau&r){
if (static_cast<int>(hauteur) != r.getHauteur() || static_cast<int>(largeur) != r.getLargeur()) return false;
for(unsigned int i=0; hauteur; i++)
for(unsigned int j=0; j<largeur; j++)
if (reseau[i][j].getIndEtat() != r.getReseau()[i][j].getIndEtat()) return false;
return true;
};
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