// Constants
// Cell initialization
function setup() {
// Setup boilerplate
for (let x=2;x<=18;x+=4) {
for (let y=2;y<=18;y+=4) {
let color=Math.ceil(Math.random()*2);
cells[cellIndex(x, y)] = color;
let neighbors = neighborCells(x, y);
for (let i=0;i<neighbors.length;i++) {
cells[neighbors[i]] = color;
}
}
}
renderCells();
}
// northIndex()
// southIndex()
// eastIndex()
// westIndex()
// neighborCells()
// cellIndex()
// renderCells()