Пример #1
0
 public Field(int width, int height, Snek snake)
 {
     this.width  = width;
     this.height = height;
     this.snake  = snake;
     seed        = new Random();
     makeApple();
 }
Пример #2
0
        private void start()
        {
            Snek snake = new Snek(WIDTH * HEIGHT, Direction.RIGHT);

            snake.add(new Coordinate(0, 0));
            Field field = new Field(WIDTH, HEIGHT, snake);

            w = new GameWindow(field, FRAMES);
            w.Show();
        }
Пример #3
0
 static void Main()
 {
     using (var game = new Snek())
         game.Run();
 }