public void IterateHex_Ordered(ProcessCell_XY processCell) { for (int y = yCount - 1; y >= 0; y--) { for (int i = 0; i < 3; i++) { for (int x = xCount - 1; x >= 0; x--) { int order = x % 3; bool timeToProcessCell = false; if (i == 0 && order == 1) { timeToProcessCell = true; } else if (i == 1 && order == 0) { timeToProcessCell = true; } else if (i == 2 && order == 2) { timeToProcessCell = true; } if (timeToProcessCell) { processCell(x, y); } } } } }
public void IterateHex_Simple(ProcessCell_XY processCell) { for (int x = 0; x < xCount; x++) { for (int y = 0; y < yCount; y++) { processCell(x, y); } } //for (int y = yCount - 1; y >= 0; y--) //{ // for (int x = xCount - 1; x >= 0; x--) // { // processCell(x, y); // } //} }