0.5.0 • Published 10 years ago

ecoscript v0.5.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
10 years ago

EcoScript

A simple, YAML-configurable natural ecosystem simulator.

Installation

$ npm install ecoscript

Example

See the example config

Usage

SYNOPSIS
  
    ecoscript FILE [OPTIONS]

DESCRIPTION

    ecoscript reads a YAML-formatted config file and creates an "ecosystem"
    internally. It then spits out a textual representation of the ecosystem
    turn by turn until the shell recieves the signal to terminate (usually
    by pressing CTRL-C).

OPTIONS

    -d [NUMBER], --delay [NUMBER]
          Sets the delay in milliseconds between each turn. Defaults to 500.

    -r [TURNS], --result [TURNS]
          Run the ecosystem silently for the specified number of turns,
          then spit out the result. If no number is specified, just print
          the ecosystem as-is and exit.

    -i, --interactive
          Run normally, but allow execution to paused or resumed with the
          Enter key. Start paused.

JavaScript API

const ecoscript = require('ecoscript')
const fs = require('fs')

const text = fs.readFileSync('myConfig.yml')
const world = ecoscript(text)

console.log(world.next().value)
// Output:
// =========
// =     w =
// =    ***=
// = **    =
// =  b  **=
// =========
0.5.0

10 years ago

0.4.1

10 years ago

0.3.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago