This is an implementation of the classic 2048 game in C. The game is played in the console window and features the iconic sliding and merging of numbered tiles.
- Classic 2048 gameplay with console-based interface
- Player control using WASD keys
- Random tile generation
- Game over detection
- C compiler (e.g., GCC, Clang, or MSVC)
- Clone the repository:
git clone https://github.com/coding-pelican/game2048-c.git
- Navigate to the project directory:
cd game2048-c
- Compile the source code:
clang main.c game2048.c -o game2048
- Run the game:
./game2048
- Use the WASD keys to move the tiles:
- W: Move up
- A: Move left
- S: Move down
- D: Move right
- Merge tiles with the same number to create larger numbers
- The game ends when no more moves are possible
The project consists of the following files:
main.c
: The main entry point of the programgame2048.c
: The main game logic and rendering codegame2048.h
: Header file containing function declarations and constantsrandom.h
: Header file for random number generationREADME.md
: This readme file providing an overview of the project
- Add score tracking
- Implement high score system
- Add color support for better visualization
- Implement undo functionality
- Add game board size selection option
This project is released under the MIT License. See the LICENSE file for more details.
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.
For any questions or inquiries, please contact the project author:
- Name: Gyeongtae Kim
- Email: codingpelican@gmail.com
Enjoy playing 2048!