private void CalculateTriangles() { //**E** for (int round = 0; round < 2; round++) { for (int column = 0; column < FieldSize.ColumnsCount - 1; column++) { //**D** for (int row = 0; row < FieldSize.RowsCount - 1; row++) { ITriangle triangle = iTriangle.CreateTriangle(); //**A** triangle.TopA = ListColumns[column].Column[row]; if (round == 0) { //**B** triangle.TopB = ListColumns[column].Column[row + 1]; //**C** triangle.TopC = ListColumns[column + 1].Column[row + 1]; } //**F** else if (round == 1) { triangle.TopB = ListColumns[column + 1].Column[row + 1]; triangle.TopC = ListColumns[column + 1].Column[row]; } Triangles.Add(triangle); } } } }