(function(u,d){var l,n,p,q;l=200;n=400;p=180;q={title:"\u65e0\u803b\uff0c\u6211\u5c45\u7136{0}\uff0c\u624d{1}\u5206\uff0c\u51fb\u8d25{2}%\u4eba\uff01\u8fde\u65b9\u5757\u6e38\u620f\u90fd\u5728\u8650\u6211\uff01",link:"http://game.ikongzhong.cn/games/cube",desc:"变态方块游戏,纯粹找虐",img_width:"640",img_height:"640",img_url:"http://game.ikongzhong.cn/icon/cube.png"};var r=[[[0,-1],[-1,1],[0,0],[0,1]],[[0,-1],[1,1],[0,0],[0,1]],[[0,0],[-1,0],[0,1],[0,-1]],[[-1, -1],[0,-1],[0,0],[1,0]],[[0,-1],[1,-1],[-1,0],[0,0]],[[0,-1],[1,-1],[0,0],[1,0]],[[0,-1],[0,0],[0,1],[0,2]]],s={"童年夭折":[0,1],"毫无童年":[2,3],"童年苦命":[4,5],"童年辍学":[6,8],"童年早熟":[9,12],"童年巨乳":[13,16],"童年老妖":[17,20],"外星人":[21,Infinity]},k={clone:function(a){var b;if("object"===typeof a)if("[object Array]"===Object.prototype.toString.call(a)){b=[];for(var c= a.length;c--;)b[c]=this.clone(a[c])}else for(c in b={},a)b[c]=this.clone(a[c]);else return a;return b},format:function(){for(var a=arguments[0],b=1,c=arguments.length;b=this.waitTime&&(this.waitTime=10),this.score+=1):this.score=a;this.scoreElem.innerHTML=k.format("S\uff1a{0}\u5206",this.score);for(var b in s)if(a=s[b],this.score>=a[0]&&this.score<=a[1]){this.level=b;this.levelElem.innerHTML=k.format("lv\uff1a{0}",b);break}},checkXBoundary:function(a){var b=0,c=this.transitionCoordinate(this.shape.data,this.shape.x,this.shape.y);try{for(var d=0,h=c.length;df||-1===a&&0===f){b=-1;break}else if("undefined"===typeof a&&f>e[0].length-1||1===a&&f===e[0].length-1){b=1;break}else if("undefined"===typeof a&&e[g][f]||-1===a&&e[g][f-1]||1===a&&e[g][f+1]){b=2;break}}}catch(k){}return b},checkYBoundary:function(){for(var a=!0,b=this.transitionCoordinate(this.shape.data,this.shape.x,this.shape.y),c=0,d=b.length;cc;c++)a[c]=parseInt(10*Math.random()),b+=a[c];return a.join("")},initElement:function(){this.shapeElem= d.getElementsByClassName("main-info-shape")[0];this.scoreElem=d.getElementsByClassName("main-info-score")[0];this.levelElem=d.getElementsByClassName("main-info-level")[0];this.curtainElem=d.getElementsByClassName("curtain")[0];this.startElem=d.getElementsByClassName("curtain-start")[0];this.endElem=d.getElementsByClassName("curtain-end")[0];this.resultElem=this.endElem.getElementsByClassName("curtain-header")[0];this.statisticElem=d.getElementsByClassName("curtain-info")[0];this.rectImage=new Image; this.rectImage.src="rect.png"},pause:function(){this.isParse?(this.isParse=!1,this.translateYShape()):(this.isParse=!0,this.translateTimer&&clearTimeout(this.translateTimer))},rotateShape:function(){if(5!==this.shape.index){var a=this.shape.data,b=[];this.clearShape();for(var c=0,d=a.length;c\u53c2\u4e0e\u4eba\u6570\uff1a{0}\u4eba微信号:hbpyq100',b.count)}};a.open("GET","statistic.php",!0);a.send()},start:function(){this.curtainElem.style.display="none";this.waitTime=180;this.isParse=!1;this.changeGrade(0);this.createMatrix();m.clearRect(0, 0,l,n);this.createNewShape()},stop:function(){this.isParse=!0;this.translateTimer&&clearTimeout(this.translateTimer);this.changeGrade(this.score);this.curtainElem.style.display="block";this.startElem.style.display="none";this.endElem.style.display="block";var a=k.format("

\u606d\u559c\u4f60\u83b7\u5f97{0}\u5206\uff0c\u8d85\u8fc7{1}%\u7684\u4eba

\u83b7\u5f97\u201c{2}\u201d\u52cb\u7ae0

",this.score,this.getPercent(),this.level);21<=this.score&&(a+="

\u5151\u6362\u7801\uff1a"+this.getRedeemCode()+ "

");this.resultElem.innerHTML=a},transitionCoordinate:function(a,b,c){for(var d=[],e=0,f=a.length;e