Exemple #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (down)
            {
                Snake.movedown();
            }
            if (up)
            {
                Snake.moveup();
            }
            if (right)
            {
                Snake.moveleft();
            }
            if (left)
            {
                Snake.moveright();
            }

            this.Invalidate();
        }