SanderMertens / 0x2048

A yet another implementation of the game 2048 in C!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0x2048

A yet another implementation of the game 2048 in C!

Requirements

  • SDL2
  • SDL2_ttk
  • SDL2_mixer

Meeting the Requirements

The project uses CMake to compile the project

Make sure that the requirements are met.

Linux

sudo apt-get update

sudo apt-get install cmake libsdl2-dev libsdl2ttf-dev libsdl2-mixer-dev

This installs the necessary libraries under linux.

Windows

Under Windows, you can download the libraries here.

How to compile

Clone this github repository, and make a folder named 'build' inside the project root folder.

git clone https://github.com/GnikDroy/0x2048

mkdir build

Then, we can build the game inside this folder.

cd build

cmake ..

make

This will create a new folder named bin inside the build folder.

The compiled program should be inside.

The game has not been tested under windows but should work perfectly fine. If there are any platform issues, please start an issue.

Running

After compiling, we can execute the game!

cd bin

./2048

Notice that there is a font file and a few audio resources inside the bin directory. They are used by the game to render the text and play audio.

The game won't run without these.

Creating the documentation.

The project uses Doxygen for managing its documentation.

If you wish to read the documentation, install doxygen.

sudo apt-get install doxygen-gui

You might also need to install graphviz for visualizing the relations.

sudo apt-get install graphviz

You can create the docs by running doxygen inside the root folder.

All the documentation will be created under the docs folder.

Tests

Since this was a simple enough project, no tests were written. I do not intend to write them in the future as well.

Game Resources

This project uses audio from opengameart.com

About

A yet another implementation of the game 2048 in C!

License:MIT License


Languages

Language:C 46.6%Language:C++ 27.8%Language:CMake 25.7%