2048 is a sliding block puzzle played on a 4×4 grid, with numbered tiles that slide when a player moves them
using the four arrow keys. Each time you press an arrow key, tiles will slide as far as possible in the chosen direction until they are stopped by either another tile or the edge of the grid.
If two tiles of the same number collide while moving, they will merge into one tile with the value of the two tiles that collided.
So, for example, when two tiles with the number 2 collide, they merge to form a 4 tile.
Every turn, a new tile will randomly appear in an empty spot on the board with a value of either 2 or 4.
The object of the game is to get to the 2048 tile.

To play, simply use the four arrow keys, or if you are on a mobile device, swipe left, right, up or down.
If you leave a game before completing, it will remember the grid for when you come back.

Copyright (c) 2014 Gabriele Cirulli.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.