itr.next(); prevPoint = nextPoint; nextPoint = new double[6]; itr.currentSegment(nextPoint);
	protected void paintEdge(MapLayer layer, int x, int y, Graphics g) {		Polygon grid = createGridPolygon(x,y,0);		PathIterator itr = grid.getPathIterator(null);		double nextPoint[] = new double[6], prevPoint[],firstPoint[];			Point p = screenToTileCoords(x, y);		int tx = p.x;		int ty = p.y;				itr.currentSegment(nextPoint);		firstPoint = prevPoint=nextPoint;				//NORTH		if(layer.getTileAt(tx,ty-1)==null) {			itr.next();						nextPoint = new double[6];			itr.currentSegment(nextPoint);			g.drawLine((int)prevPoint[0],(int)prevPoint[1],(int)nextPoint[0],(int)nextPoint[1]);		}				//EAST		if(layer.getTileAt(tx+1,ty)==null) {			itr.next();			prevPoint = nextPoint;			nextPoint = new double[6];			itr.currentSegment(nextPoint);			g.drawLine((int)prevPoint[0],(int)prevPoint[1],(int)nextPoint[0],(int)nextPoint[1]);		}				// SOUTH		if(layer.getTileAt(tx,ty+1)==null) {			itr.next();			prevPoint = nextPoint;			nextPoint = new double[6];			itr.currentSegment(nextPoint);			g.drawLine((int)prevPoint[0],(int)prevPoint[1],(int)nextPoint[0],(int)nextPoint[1]);		}				// WEST		if(layer.getTileAt(tx-1,ty)==null) {			g.drawLine((int)nextPoint[0],(int)nextPoint[1],(int)firstPoint[0],(int)firstPoint[1]);		}	}