예제 #1
0
 public Form1()
 {
     InitializeComponent();
     cabeza = new Cola(10, 10);
     comida = new Comida();
     g      = canvas.CreateGraphics();
 }
예제 #2
0
 public void findejuego()
 {
     puntaje     = 0;
     puntos.Text = "0";
     ejex        = true;
     ejey        = true;
     cabeza      = new Cola(10, 10);
     comida      = new Comida();
     //MessageBox.Show("Perdiste");
 }
예제 #3
0
 public void Meter()
 {
     if (siguiente == null)
     {
         siguiente = new Cola(this.x, this.y);
     }
     else
     {
         siguiente.Meter();
     }
 }
예제 #4
0
 public void FinDelJuego()
 {
     this.dirx           = 0;
     this.diry           = 0;
     this.ejex           = true;
     this.ejey           = true;
     this.puntos         = 0;
     this.lblPuntos.Text = puntos.ToString();
     cabeza = new Cola(10, 10);
     comida = new Comida();
     MessageBox.Show("GAME OVER");
 }
예제 #5
0
 public void findeljuego()
 {
     puntaje     = 0;
     puntos.Text = "0";
     ejex        = true;
     ejey        = true;
     xdir        = 0;
     ydir        = 0;
     cabeza      = new Cola(10, 10);
     comida      = new Comida();
     MessageBox.Show("GAME OVER");
 }
예제 #6
0
 public Cola(int x, int y)
 {
     this.x         = x;
     this.y         = y;
     this.siguiente = null;
 }