Terminal version of the game "2048" written in C++.
The game and code is made to run natively on the GNU/Linux and MacOS platforms, but cross-platform compatibility for Windows has been added too.
g++
, clang++
, pgc++
, icpc
, etc.)git clone https://github.com/garlinhs/game-2048
cd game-2048
For both CMake and Meson, the default C++ compiler on your system will be used.
If you wish to manually select a C++ compiler, optionally add CXX=clang++ cmake
or CXX=clang++ meson
etc.
ctest -S setup.cmake
cmake --install build
2048 # run `build/2048` if game is not installed
meson build
meson test -C build
meson configure build --prefix=$HOME/.local
meson install -C build
2048 # run `build/2048` if game is not installed
First of all, thank you for contributing 😄! A few things to note:
If you have found a bug, or have a feature that you'd like implemented, raise an issue.
If you have proposed a pull request, make sure that you run clang-format
on the source code (both, .cpp
and .hpp
) files if you've made changes there.
In your local repository, run git update-index --skip-worktree ./data/*.txt
to ensure that changes to the data files are not tracked by git, and thus are not staged.
Copyright (c) Garlinh Soler. All rights reserved.
Licensed under the MIT License.