Example #1
0
        public void drawStartingMaze()
        {
            g.FillRectangle(Brushes.White, 0, 0, 800, 400);

            Cell aux = new Cell(0, 0);

            for (int x = 0; x < columns; x++)
            {
                for (int y = 0; y < rows; y++)
                {
                    aux.X = x;
                    aux.Y = y;

                    aux.Show(800 / columns, 400 / rows, g);
                }
            }
            g.FillRectangle(Brushes.Green, inicio.X * (800 / columns) + (800 / columns) / 8, inicio.Y * (400 / rows) + (800 / columns) / 8, 800 / columns - (800 / columns) / 4, 400 / rows - (800 / columns) / 4);
            g.FillRectangle(Brushes.Red, fim.X * (800 / columns) + (800 / columns) / 8, fim.Y * (400 / rows) + (800 / columns) / 8, 800 / columns - (800 / columns) / 4, 400 / rows - (800 / columns) / 4);
            MazeBox.Refresh();
        }