A small fork of a small clone of 1024, based on Saming's 2048 (also a clone).
Made for more mind-bending math fun. Play it here!
The idea has obviously been remixed over and over, but my idea came from playing 2584, a Fibonacci version of the game, which I found on this long list of 2048 remixes.
The inspiration to actually build the thing and start tinkering with the code was from the Udacity Short Course on building your own 2048 game.
The original 2048 game involves smashing numbers together to make new ones. The "rule" is that
two tiles of the same value -> add the tiles together
Because we started with "2" and "2", and adding a number to itself is the same as multiplying by 2, we get the sequence:
2, 4, 8, 16, ... , 2048, ... , 2^n, ...
If we start our sequence with "1" and "2", and change our rule to
two tiles are next to each other in the sequence -> add the tiles together
we'll get the famous Fibonacci sequence:
1, 1, 2, 3, 5, 8, 13, ... , 2584 , ... , (phi^n - (-phi)^{-n}) / sqrt(5), ...
If we follow the same rule, but start our sequence with random, small integers, then we'll get a generalized fibonacci number sequence. Enjoy!
Resequencing randomly landed us on a Lucas number game!
Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into master
! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process.
You can find the same information in the contributing guide.
2048 is licensed under the MIT license.
Gabriele made this internet sensation in his spare time, and it's hosted on GitHub (which means none of us have any hosting costs), but if you enjoyed the game and feel like buying him coffee, you can donate at his BTC address: 1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i
. Thank you very much!