Skip to content

nolasconapoleao/game-lab

Repository files navigation

Console Game

Build Status

Simple game to train design patterns.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Build dependencies

These are the dependencies for the compilation of all the targets

cmake
cmake-format
clang-format
doxygen
gcov
ccache

Build instructions for development

Create make files for each target (via cmake)

Run the cmake command and output the make recipe in the build folder

mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..

Build the continuous integration targets

Supported targets for continuous integration include:

- Documentation
- Coverage
- Automatic tests
- Static code analysis
- Dynamic code analysis

Run the jobs by running

make Documentation
make Coverage
make all && make test

Run code linters locally

In order to merge to master the code in the pull request should be formatted using the checks defined in the project.

clang-format -i $filename
cmake-format -i $filename

Code formating compliance can also be checked via pre commit hook.

cd <project-path>
cp tools/pre-commit.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit



Code analysis

mkdir -p build/debug++
cd build/debug++
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_DIAGNOSTIC_TOOLS=ON ../..
make all



Build and run game

  1. Create game target in release mode
mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release ../..

Note : For windows build.

  • Install build toolchain with MinGW
cmake -DCMAKE_BUILD_TYPE=Release
  1. Build the game
make Console-Game
  1. Run the game
(WINDOWS) double-click executable in bin/Console-Game.exe
(LINUX)   ./bin/Console-Game

Future work

  • Add static code analysis targets
  • Add dynamic code analysis targets
  • Add contribution guidelines

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published