-
Notifications
You must be signed in to change notification settings - Fork 0
/
MazeComponent.java
49 lines (34 loc) · 1.04 KB
/
MazeComponent.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Name:
// USC loginid:
// CS 455 PA3
// Spring 2017
import java.awt.Graphics;
import javax.swing.JComponent;
/**
MazeComponent class
A component that displays the maze and path through it if one has been found.
*/
public class MazeComponent extends JComponent
{
private static final int START_X = 10; // top left of corner of maze in frame
private static final int START_Y = 10;
private static final int BOX_WIDTH = 20; // width and height of one maze "location"
private static final int BOX_HEIGHT = 20;
private static final int INSET = 2;
// how much smaller on each side to make entry/exit inner box
/**
Constructs the component.
@param maze the maze to display
*/
public MazeComponent(Maze maze)
{
}
/**
Draws the current state of maze including the path through it if one has
been found.
@param g the graphics context
*/
public void paintComponent(Graphics g)
{
}
}