예제 #1
0
 public void Meter()
 {
     if (siguiente == null)
     {
         siguiente = new Cola(this.x, this.y);
     }
     else
     {
         siguiente.Meter();
     }
 }
예제 #2
0
 private void Bucle_Tick(object sender, EventArgs e)
 {
     g.Clear(Color.White);
     cabeza.Dibujar(g);
     comida.Dibujar(g);
     this.Movimiento();
     this.ChoqueCuerpo();
     this.ChoquePared();
     if (cabeza.Interseccion(comida))
     {
         comida.Colocar();
         cabeza.Meter();
         puntos++;
         this.lblPuntos.Text = puntos.ToString();
     }
 }