Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 677 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 677 Bytes

EletronicLife

Part of Eloquent JavaScript: A Modern Introduction to Programming book

Run on Repl.it

Install lodash dependency

npm install

Run

node EletronicLife

Alt text

Change ecosystem config

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