A simple terminal-based implementation of the 1024 game in C++.
- Compile with C++11 support:
g++ -std=c++11 project.cpp -o 1024game
- Run the executable:
./1024game
The game starts with a 4x4 grid containing two initial tiles (2 or 4). Use arrow keys to move tiles:
- Tiles slide in the chosen direction
- When two tiles with the same number collide, they merge into one tile with their sum
- After each move, a new tile (2 or 4) appears in an empty spot
- Game ends when you reach 1024 tile or no valid moves remain
- Arrow keys: Move tiles
- 'q' key: Quit the game
Reach the 1024 tile by merging matching tiles while managing limited grid space.
This project is licensed under the MIT License - see LICENSE file for details