public void drawPath(Graphics2D g) {
		int next = exit, last = exit;
		g.setColor(Color.RED);
		//g.fillRect(adjustx + exit % xTiles * tileSize + 2, adjusty + exit / xTiles * tileSize + 3, tileSize - 3, tileSize - 3);
		while (next != entry) {
			next = solver.camefrom[next / xTiles][next % xTiles];
			//g.fillRect(adjustx + next % xTiles * tileSize + 2, adjusty + next / xTiles * tileSize + 2, tileSize - 3, tileSize - 3);
			if (Math.abs(next - last) > 1) {
				g.drawLine(adjustx + next % xTiles * tileSize + tileSize / 2, adjusty + next / xTiles * tileSize + tileSize / 2, 
						adjustx + last % xTiles * tileSize + tileSize / 2, adjusty + last / xTiles * tileSize + tileSize / 2);
			} else {
				g.drawLine(adjustx + next % xTiles * tileSize  + tileSize / 2, adjusty + next / xTiles * tileSize + tileSize / 2, 
						adjustx + last % xTiles * tileSize + tileSize / 2, adjusty + last / xTiles * tileSize + tileSize / 2);
			}
			last = next;
		}
		if (entry % xTiles == 0) {
			g.drawLine(adjustx, adjusty + entry / xTiles * tileSize + tileSize / 2, 
					adjustx + tileSize / 2, adjusty + entry / xTiles * tileSize + tileSize / 2);
		} else if (entry % xTiles == xTiles - 1) {
			g.drawLine(adjustx + entry % xTiles * tileSize + tileSize / 2, adjusty + entry / xTiles * tileSize + tileSize / 2, 
					adjustx + entry % xTiles * tileSize + tileSize, adjusty + entry / xTiles * tileSize + tileSize / 2);
		} else if (entry < xTiles) {
			g.drawLine(adjustx + entry % xTiles * tileSize + tileSize / 2, adjusty, 
					adjustx + entry % xTiles * tileSize + tileSize / 2, adjusty + tileSize / 2);
		} else {
			g.drawLine(adjustx + entry % xTiles * tileSize + tileSize / 2, adjusty + entry / xTiles * tileSize + tileSize / 2, 
					adjustx + entry % xTiles * tileSize + tileSize / 2, adjusty + entry / xTiles * tileSize + tileSize);
		}
		if (exit % xTiles == 0) {
			g.drawLine(adjustx, adjusty + exit / xTiles * tileSize + tileSize / 2, 
					adjustx + tileSize / 2, adjusty + exit / xTiles * tileSize + tileSize / 2);
		} else if (exit % xTiles == xTiles - 1) {
			g.drawLine(adjustx + exit % xTiles * tileSize + tileSize / 2, adjusty + exit / xTiles * tileSize + tileSize / 2, 
					adjustx + exit % xTiles * tileSize + tileSize, adjusty + exit / xTiles * tileSize + tileSize / 2);
		} else if (exit < xTiles) {
			g.drawLine(adjustx + exit % xTiles * tileSize + tileSize / 2, adjusty, 
					adjustx + exit % xTiles * tileSize + tileSize / 2, adjusty + tileSize / 2);
		} else {
			g.drawLine(adjustx + exit % xTiles * tileSize + tileSize / 2, adjusty + exit / xTiles * tileSize + tileSize / 2, 
					adjustx + exit % xTiles * tileSize + tileSize / 2, adjusty + exit / xTiles * tileSize + tileSize);
		}
	}