Omnivore is a contained simulation featuring a herbivore (which flees) and a carnivore (which pursues).
First, ensure you have the project's dependencies:
# MacOS
brew install cmake gcc ninja
# Windows
winget install Kitware.CMake
winget install LLVM.LLVMThen, clone the project:
git clone https://codeberg.org/dalentri/omnivore.git
cd omnivoreConfigure the build folder:
cmake -B build -G NinjaCompile and run the project:
ninja -C build
./build/omnivoreWhen adding new agents to the simulation, do so with the following syntax in the main.cpp file:
field.addAgent(std::make_unique<Being_Name>(x, y));
The current supported agent types are:
- Herbivore
- Carnivore
For example:
field.addAgent(std::make_unique<Herbivore>(5, 3));
