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); } } } }
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); } } } }
public static void SetClusterId(int[] coords,ClusterIdList clusterIdList,Map map) => SetClusterId(coords,clusterIdList.GetNewClusterId(),map);
public void SetClusterIdList(ClusterIdList idList) { clusterIdList = idList.clusterIdList; clusterIdListSize = idList.clusterIdListSize; }
public static void SetClusterId(int[] coords, ClusterIdList clusterIdList, Map map) => SetClusterId(coords, clusterIdList.GetNewClusterId(), map);