
org.jaitools.demo.jiffle.life-edges.jfl Maven / Gradle / Ivy
/*
* An example Jiffle script: Conway's Game of Life
* played in a world with hard edges.
*
* See program: jeitools.demo.jiffle.GameOfLife
* for a description and example of use.
*
* Author: Michael Bedward
*/
options { outside = 0; }
n = 0;
foreach (iy in -1:1) {
foreach (ix in -1:1) {
n += world[ix, iy];
}
}
n -= world;
nextworld = (n == 3) || (world && n==2);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy