ustify"> {int r = 0; (s)
{case "Склоподібний (glass)": r = 0; break; "Матовий (mat)": r = 1; break; "Слабкий (weak)": r = 2; break; "Середній (average)": r = 3; break; "Сильний (strong)": r = 4; break;
} r;
} int FRet2 (string s)
{int r = 0; (s)
{case "glass": r = 0; break; "mat": r = 1; break; "weak": r = 2; break; "average": r = 3; break; "strong": r = 4; break;
} r;}
// Продовжити еволюцію
private void button5_Click (object sender, EventArgs e)
{if (elite.Count> 0)
{summelite = 0; (int i = 0; i = ClRet1 (rec.Glitter)
&& can.Depth> = rec.Depth
&& FRet1 (can.Surface)> = FRet1 (rec.Surface)). Add (can);. Add (list [rnd.Next (0, list.Count - 1 )]); = 0; (int i = 0; i
{label9.BackColor = Color.Green;. Text = "Еліта розвивається";
}
{label9.BackColor = Color.Red;. Text = "Еліта деградує";
}
(rnd.Next (0, 100) <= 2)
{elite.RemoveAt (rnd.Next (0, elite.Count - 1)); + = 1;. Text = "Випадкових вилучень:" + sluch.ToString ();. Visible = true;. Add (list [rnd.Next (0, list.Count - 1)]);
}. DataSource = null;. Rows.Clear () ;. DataSource = elite;
}
}
// Прополка
void button4_Click (object sender, EventArgs e)
{label13.Visible = false;. Visible = false; (numericUpDown3.Value> 0)
{int kol; vyvod = ""; (numericUpDown3.Value> elite.Count/2) = elite.Count/2; kol = (int) numericUpDown3.Value; = 0; (int i = 0; i
{min = 0; (int i = 0; i
{if (i! = 0) (ClRet1 (elite [min]. Glitter) + elite [min]. Depth + FRet1 (elite [min]. Surface)> ClRet1 (elite [i ]. Glitter) + elite [i]. Depth + FRet1 (elite [i]...