A terminal-based implementation of the 2048 puzzle game in Java.
Slide tiles on a 4x4 grid using the keyboard. When two tiles with the same number collide, they merge into one. Reach the 2048 tile to win!
| Key | Action |
|---|---|
w |
Move up |
s |
Move down |
a |
Move left |
d |
Move right |
q |
Quit |
javac *.java
java Main- The board starts with two tiles (each randomly a
2or4) - After every valid move, a new
2or4tile appears in a random empty cell - Tiles merge when two equal values collide in the direction of movement
- A merge only happens once per tile per move
- The game ends when no moves are possible