Snake game in neon style, with 2 types of food:
- Normal food : Increasing your snake size.
- Reverse food : Swapping the head and tail of a snake to reverse its direction of movement.
- Clone this repo to your folder with
git clone https://github.com/cah9xddd/snake2d_game.git
- Run CMake as follows:
⚠️ Do not forget to replace[path_to_vcpkg]
with the actual path to vcpkg on your machine!
cmake -Bbuild -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=[path_to_vcpkg]/scripts/buildsystems/vcpkg.cmake
-
Open the generated solution file in Visual Studio:
- Navigate to the "build" directory in File Explorer.
- Double-click on the
snake_game.sln
file to open it in Visual Studio.
-
Build the project:
- Once the solution is open in Visual Studio, select the desired build configuration (e.g., Debug or Release) from the toolbar.
- Click on the "Build" menu and then select "Build Solution" to compile the project.
- Alternatively, you can use the keyboard shortcut Ctrl Shift B to build the solution.
-
Run the game:
- After the build process completes successfully, you can run the game executable from the output directory.
- The executable file is typically located in the "build" directory or a subdirectory within it, depending on your project configuration.