Commit 13c0d102 authored by Yann Boucher's avatar Yann Boucher
Browse files

Fonction to_neighborhood pour CoordinateList

parent 5406caf7
Pipeline #79248 canceled with stage
......@@ -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;
......
Markdown is supported
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