示例#1
0
 public void Clean_carrots(Chokolate p)
 {
     if (p.Have_scin)
     {
         p.Have_scin = false;
     }
 }
示例#2
0
 public void WashCarrot(Chokolate c)
 {
     if (State)
     {
         c.Dirty = 0;
     }
 }
 private void button15_Click(object sender, EventArgs e)
 {
     potato = new Ice[3];
     for (int i = 0; i < potato.Length; i++)
     {
         potato[i] = new Ice();
     }
     carrot = new Chokolate[2];
     for (int i = 0; i < carrot.Length; i++)
     {
         carrot[i] = new Chokolate();
     }
     onion = new Icecream[2];
     for (int i = 0; i < onion.Length; i++)
     {
         onion[i] = new Icecream();
     }
     chicken = new Vanil();
     lapsha  = new Milk();
 }
        private void button16_Click(object sender, EventArgs e)
        {
            if (!waterTap.State)
            {
                MessageBox.Show("Холодос закрыт, может откроем?", "Ошибка логики", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            else
            {
                for (int i = 0; i < carrot.Length; ++i)
                {
                    carrot[i] = new Chokolate();
                }
                for (int i = 0; i < carrot.Length; ++i)
                {
                    carrot[i].Dirty = 0;
                }
            }
            MessageBox.Show("Мороженое достали", "Кухня", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }