Click on groups of 3+ orbs to demolish them. Try to get as few remaining orbs as possible. Re-scale the window to get a different puzzle size.
_='G1clearRecKW,H)!q[%5]8Color=@beginPa`()arcZN,jN,N-.5,08Blur=s*(<s)(@U20*(>4)"★",i7,j22$;.3,"#000"U.9*HCKH-s)}iJ,aG o=],]=a,ZIrJ(X>ikIrkJ(rJ(Y>rkJk1}W=a.wid`,H=a.height,X=W,Y=H,C=X*Y,s=32,q="#4afz3e4zfd3ze63zc3f"A=[]!=[],$=iFIj]:jF[j]:D;C>>7A[*X^0I*Y^0]=5+DaddEv|tList|e"mouseup",(oGQp=A[uXIvY],p>4G!$<10sqri-u2)+j-v2))<2.5(=p%5_ )}Q(O=Vs))<3) Vp_C-=O*(s>p!QL=(=~teZG s>i})).l|g`)L=Y-L;L--;)ce(0KW_else AceZ,1X--,i=;)}_random()]c~lfo>i;++i)function ]==o?iMa`. return ,a):0)++"px Arial",Tex[j]j=0;Y>j;c.globalAlpha=,c.Style=pow(abs(),-1i=0.spli=o.cli|tt(&&r(A[i*s+>>5[r!;X$++j)8shadow@"#fff"D5*^0;F>.4?G){I][J,rK,0,Ns/2Qif(Ufont=Vu,v,Z(i_);`thk+1z0#|en~.fil';for(Y in $='~|zk`_ZVUQNKJIGFD@8$! ')with(_.split($[Y]))_=join(pop());eval(_)
Xz0nBhtHBBAxEWNsZWFyUmVjGRZLVyxIKSEEDxJxWw4lNV04Q29sb3I9QGJlZ2luUGFgKCkRYXJjWh1OLGodTixOLS41LDA4Qmx1cj1zKigOPHMpFAMoFBJAVTIwKigOPjQpDCLimIUiLGkdNyxqHTIyFCQ7EC4zLBIiIzAwMCIRVS45KkgMQ0tILXMpfQYZaUosYUcJbz0fXSwfXT1hLFoaHBVJcgcVSgsoWBU+aRoca0lyB2tKCyhyGh8VB0oVCyhZFT5yGh9rB0prCzF9BFc9YS53aWRgLEg9YS5oZWlnaHQsWD1XHixZPUgeLEM9WCpZLHM9MzIscT0iIzRhZnozZTR6ZmQzemU2M3pjM2YiFxkWFEE9W10hBAI9W10sDyQOPWlGHBVJal06akYCW2oVXTpEBBY7Qz4+NwVBWwEqWF4wSQEqWV4wXT01K0QbFGFkZEV2fHRMaXN0fGUbIm1vdXNldXAiLAYob0dRcD1BW3UYWB5JdhhZHl0scD40RwQWIQQPJA48MTAaCHNxchkTaS11FDIpKxNqLXYUMikpPDIuNRooDj1wJTVfCRspfVEoTz1WcykpPDMpCVZwXwRDLT1PKihzPnAUFiFRTD0oAj0CfnRlGwZaRwlzPml9KSkubHxnYCkETD1ZLUw7TC0tOykCF2NlKDBLV19lbHNlIEEXY2VaLDEUWC0tLGk9FTsbKX1fAQhyYW5kb20oKQIcXQNjfmwEZm8bBT5pOysraSkGZnVuY3Rpb24gB109PW8/GWkITWFgLglyZXR1cm4gCyxhKTowKSsMKyJweCBBcmlhbCIsA1RleBkOAltqXQ9qPTA7WT5qOxBjLmdsb2JhbEFscGhhPREsYy4SA1N0eWxlPRMIcG93KAhhYnMoFCksFS0xFmk9MBcuc3BsaRg9by5jbGl8dBl0KBomJhtyKBxBW2kdKnMrHj4+NR8CW3IhO1gFJCsraik4EXNoYWRvd0AiI2ZmZiIRRDUqAV4wO0YaAT4uND9HKXtJXVtKLHJLLDAsTnMvMlFpZihVZm9udD1WGXUsdixaKGlfKTtgdGhrKzF6MCN8ZW5+LmZpbCc7Zm9yKFkgaW4gJD0nfnx6a2BfWlZVUU5LSklHRkRAOCQhHx4dHBsaGRgXFhUUExIREA8ODAsJCAcGBQQDAgEnKXdpdGgoXy5zcGxpdCgkW1ldKSlfPWpvaW4ocG9wKCkpO2V2YWwoXyk=
/*
* Original source code
* This was later hand minified with all
* sorts of tricks and then crushed by
* http://www.iteral.com/jscrush/
*/
// Variables
var NEW_DEAD_BLOCK = 10;
var OLD_DEAD_BLOCK = 11;
var width = a.width;
var height = a.height;
var blockSize = 32;
var xSize = parseInt(width/blockSize);;
var ySize = parseInt(height/blockSize);;
var count = xSize * ySize;
var colors = ["#4af","#3e4","#fd3","#e63","#c3f"];
// Rendering function
function render() {
c.globalAlpha = 1;
c.clearRect(0, 0, width, height);
for(i = 0; i < xSize; ++i) {
for(j = 0; j < ySize; ++j) {
c.shadowBlur = blockSize;
c.shadowColor = "#fff";
c.fillStyle = colors[A[i][j] % 5];
if (A[i][j] < NEW_DEAD_BLOCK) {
c.beginPath();
c.arc(
i * blockSize + blockSize / 2,
j * blockSize + blockSize / 2,
blockSize / 2 - 0.5, 0, blockSize);
c.fill();
// New stuff: Bomb
if (A[i][j] > 4) {
c.fillStyle = "#fff";
c.font = "20px Arial";
c.fillText("★", i * blockSize + 7, j * blockSize + 22);
}
}
}
}
c.globalAlpha = 0.3;
c.fillStyle = "#000";
c.font = height * 0.9 + "px Arial";
c.fillText(count, 0, height - blockSize);
}
// Block tainting function
function taintGroup(i, j, newValue) {
var orig = A[i][j];
A[i][j] = newValue;
var result = 1;
if (i > 0 && A[i-1][j] == orig)
result += taintGroup(i-1, j, newValue);
if (i < xSize-1 && A[i+1][j] == orig)
result += taintGroup(i+1, j, newValue);
if (j > 0 && A[i][j-1] == orig)
result += taintGroup(i, j-1, newValue);
if (j < ySize-1 && A[i][j+1] == orig)
result += taintGroup(i, j+1, newValue);
return result;
}
// Mouse click event
document.addEventListener("mouseup", function (e) {
var xCoord = parseInt(e.clientX/blockSize);
var yCoord = parseInt(e.clientY/blockSize);
var orig = A[xCoord][yCoord];
// Colors outside the grid are not clickable
if (typeof orig == 'undefined') return;
// New stuff: Bomb
if (orig > 4) {
for (i = 0; i < xSize; ++i) {
for (j = 0; j < ySize; ++j) {
if (A[i][j] < NEW_DEAD_BLOCK
&& Math.sqrt(Math.pow(Math.abs(i - xCoord),2) + Math.pow(Math.abs(j - yCoord), 2)) < 2.5) {
A[i][j] = orig % 5;
}
}
}
render();
return;
}
var taintCount = taintGroup(xCoord, yCoord, NEW_DEAD_BLOCK);
if (taintCount < 3) {
taintGroup(xCoord, yCoord, orig);
return;
}
count -= taintCount;
for (i = 0; i < xSize; ++i) {
// Filter only untainted blocks
A[i] = A[i].filter(function (x){return x < NEW_DEAD_BLOCK});
var untaintedCount = A[i].length;
if (untaintedCount > 0) {
// Move the destroyed blocks to the beginning of the array
var remainingBlocks = ySize - untaintedCount;
while (remainingBlocks--) {
A[i].splice(0, 0, OLD_DEAD_BLOCK);
}
} else {
// Remove a column and start looking for empty columns again
A.splice(i, 1);
xSize--;
i=-1;
}
}
render();
});
// Generate puzzle
var A = Array(xSize);
for (i = 0; i < xSize; ++i) {
A[i] = Array(ySize);
for(j = 0; j < ySize; ++j) {
if (i>0 && Math.random() > 0.4) {
A[i][j] = A[i-1][j];
} else if (j > 0 && Math.random() > 0.4) {
A[i][j] = A[i][j-1];
} else {
A[i][j] = Math.floor(Math.random()*5);
}
}
}
// New stuff: Bomb
for (i = 0; i < count>>7; ++i) {
A[Math.floor(Math.random()*xSize)][Math.floor(Math.random()*ySize)] = 5 + Math.floor(Math.random() * 5);
}
// First render
render();