Пример #1
0
 public static void SetClusterId(ClusterIdList clusterIdList,Map map)
 {
     clusterIdList.Reset();
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             map.map[i, j].ClusterId = -1;                
         }
     }
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             if (map.map[i, j].ClusterId == -1 && map.map[i, j].BaseMass != 0)
             {
                 SetClusterId(new int[2] { i, j }, clusterIdList.GetNewClusterId(),map);
             }
         }
     }
 }
Пример #2
0
 public static void SetClusterId(ClusterIdList clusterIdList, Map map)
 {
     clusterIdList.Reset();
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             map.map[i, j].ClusterId = -1;
         }
     }
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             if (map.map[i, j].ClusterId == -1 && map.map[i, j].BaseMass != 0)
             {
                 SetClusterId(new int[2] {
                     i, j
                 }, clusterIdList.GetNewClusterId(), map);
             }
         }
     }
 }
Пример #3
0
 public static void SetClusterId(int[] coords,ClusterIdList clusterIdList,Map map) => SetClusterId(coords,clusterIdList.GetNewClusterId(),map);
Пример #4
0
 public void SetClusterIdList(ClusterIdList idList)
 {
     clusterIdList = idList.clusterIdList;
     clusterIdListSize = idList.clusterIdListSize;
 }
Пример #5
0
 public void SetClusterIdList(ClusterIdList idList)
 {
     clusterIdList     = idList.clusterIdList;
     clusterIdListSize = idList.clusterIdListSize;
 }
Пример #6
0
 public static void SetClusterId(int[] coords, ClusterIdList clusterIdList, Map map) => SetClusterId(coords, clusterIdList.GetNewClusterId(), map);