Last active
March 21, 2019 11:01
Revisions
-
thinklinux revised this gist
Mar 21, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // I little bot that I've made for the game Kuku Kube // I found 2 bots so far and they were a lot slower than this one :) // Start the game and paste the code in the browser's console. Hit enter and... don't watch! You can be hypnotized! :D // You can play (or cheat) the game here http://106.186.25.143/kuku-kube/en-3/ // Have fun! -
thinklinux renamed this gist
Apr 11, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
thinklinux revised this gist
Apr 11, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,4 +61,4 @@ setInterval(function () { init(); }, 0); -
thinklinux created this gist
Apr 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ // I little bot that I've made for the game Kuku Kube // I found 2 bots so far and they were a lot slower than this one :) // Start the game and paste the code in the browser's console. Hit enter and... don't watch! You can be hypnotize! :D // You can play (or cheat) the game here http://106.186.25.143/kuku-kube/en-3/ // Have fun! console.log('I\'m a bot') var init = function () { var color_arr = [], elementsMap = {}, basicColor; var findBasicColor = function (color) { if (color_arr.indexOf(color) !== -1) { basicColor = color; } else { color_arr.push(color); } } var findDiffColor = function () { if (!basicColor) { return; } var len = color_arr.length, i = 0, diffItem; for (i; i<len; i++) { var color = color_arr[i]; if (color !== basicColor) { diffItem = elementsMap[color]; break; } } return diffItem || null; } var matches = document.querySelectorAll("#box span"), len = matches.length, i = 0, diffItem; for (i; i<len; i++) { var item = matches[i]; elementsMap[item.style.background] = item; findBasicColor(item.style.background); diffItem = findDiffColor(); if (diffItem) { $(diffItem).trigger('click'); break; } } } setInterval(function () { init(); }, 1);