Reputation: 670
In order to cheat the game 2048 for fun, does anyone know how to change the random implementation on Windows or Linux? On a linux kernel, I guess that you reimplement the rand function simply like this:
double rand() {
return 0.0;
}
then rebuild your kernel.
But no idea on Windows.
I would appreciate any help on it.
Upvotes: 0
Views: 127
Reputation: 14497
In order to beat 2048 simply open your web browser's console while playing the game and type in:
Math.random = function() { return 0.0 }
In firefox it is Tools -> Web developer -> Web console
In Chromium it is Tools -> Javascript console.
P.S. I had to check if it's not yet April 1st as rebuilding kernel in order to cheat a web game sounds a bit too extreme
Upvotes: 2