public static class GridWorldVisualizer.MapPainter extends java.lang.Object implements StaticPainter
Modifier and Type | Field and Description |
---|---|
protected int |
dheight |
protected int |
dwidth |
protected int[][] |
map |
Constructor and Description |
---|
GridWorldVisualizer.MapPainter(int[][] map)
Initializes for the domain and wall map
|
public GridWorldVisualizer.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)
StaticPainter
paint
in interface StaticPainter
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