Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top