コード例 #1
0
ファイル: Form1.cs プロジェクト: LOSanchez/Snake
 public Form1()
 {
     espacio = 10;
     InitializeComponent();
     juego  = canvas.CreateGraphics();
     cabeza = new Cola(10, 10);
     comida = new Comida();
 }
コード例 #2
0
 public void meter()
 {
     if (siguiente == null)
     {
         siguiente = new Cola(this.x, this.y);
     }
     else
     {
         siguiente.meter();
     }
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: LOSanchez/Snake
 public void findeJuego()
 {
     xdir        = 0;
     ydir        = 0;
     puntaje     = 0;
     puntos.Text = "0";
     ejex        = true;
     ejey        = true;
     cabeza      = new Cola(10, 10);
     comida      = new Comida();
     MessageBox.Show("Perdiste");
 }
コード例 #4
0
 public Cola(int x, int y)
 {
     this.x    = x;
     this.y    = y;
     siguiente = null;
 }