public void Dibujar(Graphics G) { if (Siguiente != null) { Siguiente.Dibujar(G); } G.FillRectangle(new SolidBrush(Color.DarkGreen), this.x, this.y, this.Ancho, this.Ancho); }
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(); } }