title: How to find all clusters of forest on map?
body: <p>How to find all clusters of forest on map ?
  I have simple class cell like (Type is enum {RIVER, FOREST,GRASS,HILL}</p>
  
  <pre><code>class Cell{
     public:
       Type type;
       int x;
       int y
  };
  </code></pre>
  
  <p>and map like <code>vector&lt;Cell&gt; grid</code>. Can anyone suggest me algorithm to create <code>list&lt;list&lt;Cell&gt;&gt; clusters</code> where list contains FOREST cells in same cluster (cluster are set of connected cells - connection can be in eight direction:up,down,left,right,up_right,up_left,down_left,down_right)? I need to find all clusters of forest on map and put every single cluster in <code>list&lt;Cell&gt;</code>.</p>