Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TheMrSheldon/libsnake
The aim of libsnake is to provide an intuitive and fast library for simulating snake games. It is written with the battlesnake.com competition in mind.
https://github.com/TheMrSheldon/libsnake
battlesnake cmake cpp
Last synced: about 1 month ago
JSON representation
The aim of libsnake is to provide an intuitive and fast library for simulating snake games. It is written with the battlesnake.com competition in mind.
- Host: GitHub
- URL: https://github.com/TheMrSheldon/libsnake
- Owner: TheMrSheldon
- License: gpl-3.0
- Created: 2021-12-03T08:16:33.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T06:37:40.000Z (over 2 years ago)
- Last Synced: 2024-08-03T17:15:04.304Z (5 months ago)
- Topics: battlesnake, cmake, cpp
- Language: C++
- Homepage: https://themrsheldon.github.io/libsnake/
- Size: 389 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING
- License: LICENSE
Awesome Lists containing this project
README
[![Tests](https://github.com/TheMrSheldon/libsnake/actions/workflows/cmake_tests.yml/badge.svg)](https://github.com/TheMrSheldon/libsnake/actions/workflows/cmake_tests.yml)
# What is libsnake?
[TODO: Insert text here]# Using libsnake within another CMake project
Adding libsnake to your CMake project is easy. Simply add the following lines to your CMake project where `mytarget` is the target you would like to link libsnake to.
```cmake
FetchContent_Declare(
libsnake_lib
GIT_REPOSITORY https://github.com/TheMrSheldon/libsnake.git
)
FetchContent_MakeAvailable(libsnake_lib)
FetchContent_GetProperties(libsnake_lib)
target_include_directories(mytarget PRIVATE ${libsnake_SOURCE_DIR}/include/)
target_link_libraries(mytarget PRIVATE libsnake)
```# Building libsnake with VSCode (we highly recommend VSCode)
## Prerequisite
* CMake
* VSCode
* CMake Extension for VSCode
* Working C++ compiler## Build process:
1. Clone this repository
1. Open the cloned repository in VSCode
1. Ctrl+Shift+P and enter "CMake: Configure"
1. You may get asked to select a Kit: select your prefered compiler
1. Ctrl+Shift+P and enter "CMake: Build"