-
-
Save espadrine/8506402 to your computer and use it in GitHub Desktop.
Cheat on <http://www.colormunki.com/game/huetest_kiosk>. How to get the best score, how to get the worst score.
This file contains 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 characters
for(j=8;j++<88;)eval('a=patch_'+(j%4+1)+'_'+(j>>2)).parentNode.appendChild(a) |
This file contains 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 characters
var containers = [1,2,3,4].map(n => document.getElementById('draggable_row_container_' + n)); | |
function compare(a, b) { | |
return +a.id.split('_')[2] - b.id.split('_')[2]; | |
} | |
function fixContainer(c) { | |
var children = Array.prototype.filter.call(c.childNodes, a => !!a.id); | |
children.sort(compare); | |
c.innerHTML = children.map(child => child.outerHTML).join(' '); | |
} | |
containers.forEach(c => fixContainer(c)); |
This file contains 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 characters
buildPatchPositions=0 |
This file contains 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 characters
for(i=5;i--;)for(j=2;j<22;j+=j<12?11:-10)eval('a=patch_'+i+'_'+j).parentNode.appendChild(a) |
This file contains 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 characters
var containers = [1,2,3,4].map(n => document.getElementById('draggable_row_container_' + n)); | |
function compare(a, b) { | |
return +b.id.split('_')[2] - a.id.split('_')[2]; | |
} | |
function worst(l) { | |
var nl = []; | |
var halfl = l.slice(0, (l.length / 2)|0).reverse(); | |
var rest = l.slice(halfl.length).reverse(); | |
for (var i = 0; i < halfl.length; i++) { | |
nl.push(halfl[i]); | |
nl.push(rest[i]); | |
} | |
return nl; | |
} | |
function fixContainer(c) { | |
var children = Array.prototype.filter.call(c.childNodes, a => !!a.id); | |
children = worst(children.sort(compare)); | |
c.innerHTML = children.map(child => child.outerHTML).join(' '); | |
} | |
containers.forEach(c => fixContainer(c)); |
This file contains 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 characters
buildPatchPositions=patch_positions.value=Array(9).join('0,99') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some changes suggested by @jankeromnes, @crhallberg and @quentez.
golf
files require the color blocks to be reordered.cheese
files allow anything to get a better score in less characters.