A fully playable 2048 game in the terminal, built with ncurses.
- Classic 2048 gameplay in a terminal UI
- Start menu with 4x4 and 5x5 grid selection
- Window resize support in menus and gameplay
- Colored tiles (when terminal color support is available)
- Lightweight C project with Makefile build
Install ncurses development libraries:
sudo apt-get install libncurses5-dev libncursesw5-dev# Clone repository
git clone https://github.com/Abusalah0/2048.git
# Enter project directory
cd 2048
# Build
make
# Run
./2048- Up arrow: move tiles up
- Down arrow: move tiles down
- Left arrow: move tiles left
- Right arrow: move tiles right
- Enter: confirm menu selection
- q or Esc: quit game loop
- Every valid move slides tiles in one direction
- Equal adjacent tiles merge into one tile with double value
- Score increases by the merged tile value
- You win when you reach 2048
- Game ends when no moves are possible
- New tile spawn chance: 2 (70%), 4 (30%)
- Menus and board redraw on terminal resize
- Layout remains centered based on current terminal dimensions
make # build
make clean # remove object files
make fclean # remove object files and executable
make re # full rebuild- If colors do not appear, check whether your terminal supports colors.
- If UI looks compressed, increase terminal window size.



