Exemple #1
0
        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            food.drawfood(paper);
            paper = e.Graphics;
            Snake.snakedraw(paper);

            for (int i = 0; i < Snake.snakerec.Length; i++)
            {
                if (Snake.snakerec[i].IntersectsWith(food.foodrec))
                {
                    food.fooloc(randfood);
                }
            }
        }