2048 Game Copycat

Project Summary

Created a copycat of the popular 2048 using JavaFX. 2048 is played on a plain 4×4 grid, with numbered tiles that slide when a player moves them using the four arrow keys. Every turn, a new tile randomly appears in an empty spot on the board with a value of either 2 or 4. Tiles 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 a tile with the total value of the two tiles that collided. The resulting tile cannot merge with another tile again in the same move.

The board of the game was represented using a 2d array. JavaFx was used to recreate the GUI of the game. In this version, the keyboard arrows were used in replacement of swiping.