image thumbnail

Globs Game Player and Solver

by

 

Play and/or solve this fun and addictive game.

buildglobs(A)
function h = buildglobs(A)
	hold on
	h = zeros(size(A));
	cl = getcol;
	
	for k = .1:.1:.1*size(A,2)
		for j = .1:.1:.1*size(A,1)
			h(round(j*10),round(k*10)) = fillcc(k*3 - 5,-j*3 + 5,A(round(j*10),round(k*10)));
		end
	end
	for k = 2:size(A,1)
		for j = 1:size(A,2)
			if A(k,j) == A(k-1,j)
				patch([0 .2 .2 0]-5+.2+.3*(j-1),[0 0 .3 .3]+.4+4.3-.3*(k-1),cl(A(k,j),:),'edgecolor','none','linewidth',.001)
			end
		end
	end
	for k = 1:size(A,1)
		for j = 2:size(A,2)
			if A(k,j) == A(k,j-1)
				patch([0 .3 .3 0]-5+0+.3*(j-1),[0 0 .2 .2]+.1+4.5-.3*(k-1),cl(A(k,j),:),'edgecolor','none','linewidth',.001)
			end
		end
	end
	set(h,'linewidth',1,'edgecolor','none')
end

Contact us