Ejemplo n.º 1
0
 public bool Run()
 {
     CSnake.Move();
     CGame.BuildGameboard();
     CGame.PrintGameBoard();
     return(true);
 }
Ejemplo n.º 2
0
 public void setProlog()
 {
     this.MaximumSize = new Size(850, 510);
     this.Cursor      = new Cursor(Resources.cursorPixel.GetHicon());
     flagPoint        = false;
     snakeSpeed       = 4;
     userDirection    = Directions.Right;
     points           = 0;
     snakeHead        = new CSnake {
         Left = 100, Top = 200
     };
     snakeHead.Update(snakeHead.Left++, snakeHead.Top++);
     snakeBody = new List <CSnake>();
     g         = this.CreateGraphics();
     setFoods();
     GameLoop.Interval = 20;
     GameLoop.Start();
 }