image thumbnail
from Globs Game Player and Solver by Husam Aldahiyat
Play and/or solve this fun and addictive game.

gopath(A)
function st = gopath(A)
	
	% Thanks to Roy Mathew for this line
	st = find(bwlabel(A == A(1),4) == 1);

end

Contact us at files@mathworks.com