Stats: Turn 1, Turtles 1;
Name ; Rule ; Active?
- speed-> @forward 1-> @type == 'zoomer'
- spawn-> @clone type: 'zoomer', color: 'red'-> @type == 'mommy' and sim.time % 8 == 0
- wobble->
@rotateLeft tau / 16 * (Math.random() - 0.5)
@forward 0.25-> @type == 'mommy'
- layGrass-> @patchHere().grass += 5-> true
- decayGrass-> @grass *= 0.99-> true
- diffuseGrass-> @diffuse4 'grass', (patch1) -> patch1.grass / 10 / (4+1)-> true
- setup->
sim.turtles = [sim.newTurtle(
{x:5, y:5, color:'rgb(88,88,88)', heading:0, type:'mommy'})]
patchcolor = ->
'rgb(127,'+(Math.floor Math.min 30*@grass, 255)+',127)'
sim.setAllPatches (x,y) ->
{color: patchcolor, grass:0}-> true
(https://github.com/idupree/Starplay)