
Run the following command to clone the repository:
git clone --recursive <url_of_repo>
This will clone the git submodules as well recursively. However, if you open the repo in github codespaces, you will need to run
git submodule update --init --recursive
to pull the submodules after the fact.
Run the following command to update your system:
sudo apt update
To install all Boost libraries, run:
sudo apt install libboost-all-dev
-
Create a build directory and navigate into it:
mkdir build && cd build
-
Generate the makefile using CMake:
cmake ..
-
Build the project:
make
-
Run the Snake game:
./snake
-
To debug: Install cmake and cmake tools extensions. Then under the extension panel, you will find option to Debug (play button next to it). Just hit it and choose the target snake. Your breakpoints will start hitting.
Emscripten requires development tools and Python. Install them by running:
sudo apt-get update
sudo apt-get install build-essential cmake python3
Clone the Emscripten SDK repository:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
-
Fetch the latest version of the Emscripten SDK:
./emsdk install latest
-
Activate the latest SDK tools in the current terminal session:
./emsdk activate latest
-
Activate Emscripten for the current terminal session:
source ./emsdk_env.sh