public void Button_Click(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < 30; i++)
            {
                for (int j = 0; j < 50; j++)
                {
                    pole[i, j] = new classi.Cells(false, false);
                }
            }
            for (int i = 0; i < 30; i++)
            {
                for (int j = 0; j < 50; j++)
                {
                    pole[i, j].isplace = logic.setplant(i, j, Convert.ToInt32(precent_havchika.Value));
                }
            }

            for (int i = 0; i < 30; i++)
            {
                for (int j = 0; j < 50; j++)
                {
                    grida.Content += logic.hz(pole[i, j].isfood);
                }
                grida.Content += "\n";
            }



            Timer          = new System.Windows.Threading.DispatcherTimer();
            Timer.Tick    += new EventHandler(dispatcherTimer_Tick);
            Timer.Interval = new TimeSpan(0, 0, 0, 0, 250);
            Timer.Start();
        }
 private void Clean_Click(object sender, RoutedEventArgs e)
 {
     grida.Content = "";
     ticker        = 0;
     Timer.Stop();
     for (int i = 0; i < 30; i++)
     {
         for (int j = 0; j < 50; j++)
         {
             pole[i, j] = new classi.Cells(false, false);
         }
     }
 }