d + 1, b));
	else
		return [[a, b]].concat(search_path_int(a, mid));
}

path_int = search_path_int(0, 639);

function init(canvas_name) {
	var canvas = document.getElementById(canvas_name);
	canvas.addEventListener('pointerdown', function(e){
		canvas_rect = canvas.getBoundingClientRect();
		const x = e.clientX - canvas_rect.left;
		const y = e.clientY - canvas_rect.top;
		target = Math.floor(640 - y);
		path = search_path(0, 639, proportion);
		path_int = search_path_int(0, 639);
		draw(canvas_name);
		can