Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omnivore, a contained hebivore-carnivore simulation written in C++

Omnivore is a contained simulation featuring a herbivore (which flees) and a carnivore (which pursues).

Demo gif

Getting Started

First, ensure you have the project's dependencies:

# MacOS
brew install cmake gcc ninja

# Windows
winget install Kitware.CMake
winget install LLVM.LLVM

Then, clone the project:

git clone https://codeberg.org/dalentri/omnivore.git
cd omnivore

Configure the build folder:

cmake -B build -G Ninja

Compile and run the project:

ninja -C build
./build/omnivore

Adding new agents

When 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));

About

A herbivore-carnivore CLI simulation written in C++.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages