Example #1
0
 public Form1()
 {
     cabeza = new cSerpiente(10, 10);
     comida = new cComida();
     InitializeComponent();
     g = pictureBox1.CreateGraphics();
 }
Example #2
0
 public void insertar()
 {
     if (siguiente == null)
     {
         siguiente = new cSerpiente(this.x, this.y);
     }
     else
     {
         siguiente.insertar();
     }
 }
Example #3
0
 public void fin()
 {
     velocidad       = 100;
     timer1.Interval = velocidad;
     label1.Text     = "Puntaje:";
     ejeX            = true;
     ejeY            = true;
     xDir            = 0;
     yDir            = 0;
     cabeza          = new cSerpiente(10, 10);
     comida          = new cComida();
     MessageBox.Show("Perdiste ");
     puntos = 0;
 }
Example #4
0
 public cSerpiente(int x, int y)
 {
     this.x    = x;
     this.y    = y;
     siguiente = null;
 }