RwandanMtGorilla / 2048_game

大一写的2048小游戏in C 水一篇

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2048 Game in C

This repository contains a simple implementation of the popular game 2048, written in C.

Features

  • Command line interface for a classic 2048 experience.
  • Move tiles using the arrow keys (2, 4, 6, 8) or the traditional WASD controls (W, A, S, D).
  • The game keeps track of your current score.

Compilation

Make sure you have a C compiler (like gcc) installed on your system. Then, navigate to the directory containing the game's source code and compile it with:

gcc -o 2048_game 2048.c

How to Play

  • After compilation, run the game using:
./2048_game
  • Use the 2, 4, 6, 8 or W, A, S, D keys to move the tiles.
  • Try to combine tiles to reach the 2048 tile, and get the highest score possible!
  • The game ends when the grid is full and no more moves can be made.

License

This project is open-source and available to anyone under the MIT License.

Acknowledgements

Thank you for checking out this game! Feel free to reach out with any feedback or suggestions.

About

大一写的2048小游戏in C 水一篇

License:MIT License


Languages

Language:C 100.0%