Part of Eloquent JavaScript: A Modern Introduction to Programming book
npm install
node EletronicLife
You can chage the size of the ecosystem and the quantity of plants, creatures and walls changing the line below:
var valley = new LifelikeWorld(
createEcosystem(50, 20, {"#": 15, "o": 15, "*": 25}),
{
"#": Wall,
"o": PlantEater,
"*": Plant
}
);