Skip to content

CAs: Adding interactive functions via HTML buttons #33

@bramvandijk88

Description

@bramvandijk88

Heya,

Using terra.js, I just made a simple predator prey CA that results in traveling/chaotic waves:

http://theoreticalbiology.nl/spiders/

I'm looking to extend this by allowing interactive functions, such as killing some prey, killing some predators, restarting, etc. The default terrarium functions .animate() and .stop() function propperly. How can I add new functions to this terrarium?

I tried figuring out how to do this in the terra.js module, which sort of worked, but I'm looking for advice on how to do this "neatly" in javascript.

UPDATE: i've mostly overwritten the old version, so most of the functionality I discuss here is now implemented.

Bram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions