示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            pictureBox1.Invalidate();
            Random r = new Random();
            Amoebe a = new Amoebe(r.Next(0, pictureBox1.Width), r.Next(0, pictureBox1.Height));
            Virus  v = new Virus(r.Next(0, pictureBox1.Width), r.Next(0, pictureBox1.Height));

            lijst.Add(a);
        }
示例#2
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            var count = lijst.Count;

            for (int i = 0; i < count; i++)
            {
                Amoebe a = new Amoebe(lijst[i].XPos, lijst[i].YPos);
                lijst.Add(a);
            }
        }