public void GenerateFrom(Color[,] colorMatrix) { GenerateField(colorMatrix.GetWidth(), colorMatrix.GetHeight()); ForEachCell(colorMatrix, (x, y) => { if (colorMatrix.GetCell(x, y) == Color.Transparent || colorMatrix.GetCell(x, y).Name == EMPTY_COLOR_STRING) { CreateEmptyCell(x, y); } else { CreateCell(x, y, colorMatrix.GetCell(x, y)); } }); CalculateConditions(); }