public void ClearField() { bool flag = true; for (int i = 0; i < boxes.GetCountBox(); i++) { if (i % 10 == 0) { flag = !flag; } Color color = flag ? Color.FromArgb(80, 211, 211, 211) : Color.FromArgb(150, 211, 211, 211); boxes[i].Color = color; flag = !flag; boxes[i].LastColor = color; boxes[i].IsBusy = false; boxes[i].IsShooting = false; boxes[i].Panel.Children.Clear(); } }