Beispiel #1
0
 public Map(Game game, bool withMangoose = false)
     : base(game)
 {
     _path = "map.txt";
     _withMangoose = withMangoose;
     _snake = new Snake(Game, this);
 }
Beispiel #2
0
        static void Main()
        {
            Snake a = new Snake();
            a.Move(new Point(0, 1));
            a.Print();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
 private void InitSnake()
 {
     snake = new Snake();
     for(int i = 0; i < snake.Count; i++)
     {
         SnakeGrid.Children.Add(snake[i]);
     }
     bug = new Bug();
     SnakeGrid.Children.Add(bug);
     Score.Content = "Score: 0";
 }