public static class GridWorldVisualizer.MapPainter extends java.lang.Object implements StatePainter
Modifier and Type | Field and Description |
---|---|
protected int |
dheight |
protected int |
dwidth |
protected int[][] |
map |
Constructor and Description |
---|
MapPainter(int[][] map)
Initializes for the domain and wall map
|
Modifier and Type | Method and Description |
---|---|
void |
paint(java.awt.Graphics2D g2,
State s,
float cWidth,
float cHeight)
Paints general state information not to graphics context g2
|
public MapPainter(int[][] map)
map
- the wall map matrix where 1s indicate a wall in that cell and 0s indicate it is clear of wallspublic void paint(java.awt.Graphics2D g2, State s, float cWidth, float cHeight)
StatePainter
paint
in interface StatePainter
g2
- graphics context to which the static data should be painteds
- the state to be paintedcWidth
- the width of the canvascHeight
- the height of the canvas