Esempio n. 1
0
        private void createGame()
        {
            LabirentAlgorithm labirentAlgorithm = new LabirentAlgorithm(LabirentAlgorithm.GameLevel.easy, mapSize, 5, 7, 5, 7);

            map = labirentAlgorithm.GetRandomMap();
            this.Invalidate();
            GameView gameView = new GameView(map, labirentAlgorithm, new Point(5, 6));

            gameView.Show();
        }
Esempio n. 2
0
        public GameView(int[,] map, LabirentAlgorithm labirentAlgorithm, Point squareSize)
        {
            InitializeComponent();
            curPointOfPlayer       = labirentAlgorithm.startPoint;
            this.squareSize        = squareSize;
            this.labirentAlgorithm = labirentAlgorithm;
            this.map = map;
            CreatePictureBoxs();
            List <Point> points = GetPointsThenMap();

            PaintToPictureBox(points);
        }