private static void InitializeSafeCellNeigbhourhoods(AbstractCell[] cellSpace, int highestIndex, int width) { Parallel.For(1, highestIndex - 1, i => { cellSpace[i].Neighbourhood = NeighbourhoodConstructor.getOKNeighbourhood(cellSpace, i, width); }); }
private static void InitializeSafeCellNeighbourhoods(AbstractCell[,] cellSpace, int highestIndex, int width) { //TODO need a "safe distance calculator" for 2D neighbourhood widths Parallel.For(1, highestIndex, (int i) => { Parallel.For(1, highestIndex, (int j) => { cellSpace[i, j].Neighbourhood = NeighbourhoodConstructor.getOKNeighbourhood(cellSpace, i, j, width); }); }); }