public void Meter() { if (Siguiente == null) { Siguiente = new Cola(this.x, this.y); } else { Siguiente.Meter(); } }
private void IntervaloTiempo_Tick(object sender, EventArgs e) { G.Clear(Color.White); CabezaVibora.Dibujar(G); Comida.Dibujar(G); Movimiento(); ChoqueCuerpo(); ChoquePared(); if (CabezaVibora.Interseccion(Comida)) { Comida.Colocar(); CabezaVibora.Meter(); PuntajePartida++; PuntosDePartida.Text = PuntajePartida.ToString(); } }