Pretty cool path finding and maze generating algorithms! The X represents the end and the flag represents the farthest point from the end. Space to spawn a cat on where your mouse pointer is and click anywhere to place the end on the place you clicked. (PS: the cat may sometimes get stuck! to combat this, try moving around the end.)
all credit to griffpatch tutorials!