예제 #1
0
파일: Form1.cs 프로젝트: mitko0/Maze
        // functions
        public void Generate()
        {
            g.maze.MazeComplete += (Image m) => {
                panelMaze.BackgroundImage       = m;
                panelMaze.BackgroundImageLayout = ImageLayout.None;
                panelMaze.Width  = m.Width;
                panelMaze.Height = m.Height;
                Fix();
            };
            g.maze.Generate();
            g.avatar.maze = g.maze.MazeImage;
            Cell tmp = g.maze.cells["c0r0"];

            g.avatar.Location = new Point(tmp.Bounds.X + g.wdth / 2, tmp.Bounds.Y + g.wdth / 2);
            g.awpFinish       = g.maze.last.Bounds.Location;
            g.award.rngAward(g.Level, g.rngCell());
            g.DrawAll();
        }