private void DrawGoal() { MazeBox.Refresh(); Graphics g = MazeBox.CreateGraphics(); g.DrawRectangle(new Pen(Brushes.Red, 5), new Rectangle(new Point(MazeModule.GoalX - 25, MazeModule.GoalY - 25), new Size(50, 50))); return; }
private void DrawPlayer() { MazeBox.Refresh(); DrawGoal(); Graphics g = MazeBox.CreateGraphics(); g.FillRectangle(Brushes.Black, new Rectangle(new Point(MazeModule.PlayerX - 15, MazeModule.PlayerY - 15), new Size(30, 30))); }
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(); }