Beispiel #1
0
 public Form1()
 {
     InitializeComponent();
     cabeza = new cola(10, 10);
     comida = new Comida();
     g      = canvas.CreateGraphics();
 }
Beispiel #2
0
 public void meter()
 {
     if (siguiente == null)
     {
         siguiente = new cola(this.x, this.y);
     }
     else
     {
         siguiente.meter();
     }
 }
Beispiel #3
0
 public void fin_del_juego()
 {
     punto       = 0;
     puntos.Text = "0";
     ejex        = true;
     ejey        = true;
     xdir        = 0;
     ydir        = 0;
     cabeza      = new cola(10, 10);
     comida      = new Comida();
     MessageBox.Show("Game Over");
 }
Beispiel #4
0
 public void findejuego()
 {
     puntaje     = 0;
     puntos.Text = "0";
     ejex        = true;
     ejey        = true;
     xdir        = 0;
     ydir        = 0;
     cabeza      = new cola(10, 10);
     comida      = new Comida();
     MessageBox.Show("Haz Perdido, Intentalo Más Tarde");
 }
Beispiel #5
0
 public void Findejuego()
 {
     puntaje        = 0;
     Puntos.Text    = "0";
     ejex           = true;
     ejey           = true;
     xdir           = 0;
     ydir           = 0;
     bucle.Interval = 100;
     cabeza         = new cola(10, 10);
     comida         = new Comida();
     MessageBox.Show("Perdiste");
 }
Beispiel #6
0
 public cola(int x, int y)
 {
     this.x    = x;
     this.y    = y;
     siguiente = null;
 }