Hacker News new | past | comments | ask | show | jobs | submit login
Simple trick to beat 2048: left up, left down, repeat (gabrielecirulli.github.io)
2 points by kudu on March 12, 2014 | hide | past | favorite | 3 comments



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);


While you can get pretty far with it, the two times I tried this I still ended up with a filled board and "Game Over"... :(


Got close to my high score, but did not beat game. may try again. probably won't since keeping the pattern is almost more work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: