predator / prey simulation

Doodlebug

Ants ( prey) and doodlebugs ( predators) live on a 20×20 grid. Each step, doodlebugs move and eat adjacent ants; both breed when they survive long enough, and doodlebugs starve if they don't eat. It's the same C++ I wrote at NYU, compiled to WebAssembly and driven from JavaScript, so the simulation logic runs unchanged in the browser.

step 0 ants 0 doodlebugs 0