News for hackers. Stuff that matters.
Re:Simple trick to beat 2048: left up, left down, repeat by ehaveman on Wednesday March 12, 2014 @08:55PM (#7389475)
i was so hoping this was true i scripted it (paste this into your chrome console):

function keyDown(keyCode) { var e = document.createEvent("Events");

    e.initEvent("keydown", true, true);
    e.keyCode = keyCode;
    e.which = keyCode;
    
    document.body.dispatchEvent(e);   
}

controls = [ function() { keyDown(37); }, function() { keyDown(38); }, function() { keyDown(37); }, function() { keyDown(40); }, ];

i = 0; setInterval(function() { controls[i++ % controls.length](); }, 100);

There are no comments on this comment yet.