Skip to content
Snippets Groups Projects
Commit 13c0d102 authored by Yann Boucher's avatar Yann Boucher
Browse files

Fonction to_neighborhood pour CoordinateList

parent 5406caf7
No related branches found
No related tags found
No related merge requests found
Pipeline #79248 canceled
......@@ -267,6 +267,20 @@ public:
}
}
//! \brief Retourne les coordonées comme un Neighborhood, les cellules voisines étant d'état 1
Neighborhood to_neighborhood() const
{
Neighborhood n;
for (const auto& ptr : contents)
{
Property& prop = *ptr;
CoordinateProperty& coord_p = static_cast<CoordinateProperty&>(prop);
n.addNeighbor(coord_p.c, 1);
}
return n;
}
public:
//! \brief Vrai si la liste est extensible, faux si elle est fixe.
const bool dynamic;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment