/** * Returns state render layer for a gird world domain with the provided wall map. This method has been deprecated because the domain object is no * longer necessary. Use the {@link #getRenderLayer(int[][])} method instead. * @param d the domain of the grid world * @param map the wall map matrix where 0s indicate it is clear of walls, 1s indicate a full cell wall in that cell, 2s indicate a 1D north wall, 3s indicate a 1D east wall, and 4s indicate a 1D north and east wall. * @return a grid world domain state render layer */ @Deprecated public static StateRenderLayer getRenderLayer(Domain d, int [][] map){ StateRenderLayer r = new StateRenderLayer(); r.addStatePainter(new MapPainter(map)); OOStatePainter oopainter = new OOStatePainter(); oopainter.addObjectClassPainter(GridWorldDomain.CLASS_LOCATION, new LocationPainter(map)); oopainter.addObjectClassPainter(GridWorldDomain.CLASS_AGENT, new CellPainter(1, Color.gray, map)); r.addStatePainter(oopainter); return r; }
/** * Returns state render layer for a gird world domain with the provided wall map. * @param map the wall map matrix where 0s indicate it is clear of walls, 1s indicate a full cell wall in that cell, 2s indicate a 1D north wall, 3s indicate a 1D east wall, and 4s indicate a 1D north and east wall. * @return a grid world domain state render layer */ public static StateRenderLayer getRenderLayer(int [][] map){ StateRenderLayer r = new StateRenderLayer(); r.addStatePainter(new MapPainter(map)); OOStatePainter oopainter = new OOStatePainter(); oopainter.addObjectClassPainter(GridWorldDomain.CLASS_LOCATION, new LocationPainter(map)); oopainter.addObjectClassPainter(GridWorldDomain.CLASS_AGENT, new CellPainter(1, Color.gray, map)); r.addStatePainter(oopainter); return r; }