import processCell from '../build/rules.js'; import tape from 'tape'; tape.test('various scenarios', function testRules(t) { t.equal(processCell([[1,1,1], [0,0,0], [0,0,0]])[1][1], 1, 'test 1'); t.equal(processCell([[0,0,0], [1,1,1], [0,0,0]])[1][1], 1, 'test 2'); t.equal(processCell([[0,0,0], [1,1,1], [0,1,0]])[1][1], 1, 'test 3'); t.equal(processCell([[0,0,0], [1,0,1], [0,1,0]])[1][1], 1, 'test 4'); t.equal(processCell([[0,0,0], [1,0,1], [0,0,0]])[1][1], 0, 'test 5'); t.equal(processCell([[0,0,0], [1,1,0], [0,0,0]])[1][1], 0, 'test 6'); t.equal(processCell([[0,0,0], [0,1,0], [0,0,0]])[1][1], 0, 'test 7'); t.equal(processCell([[1,1,1], [1,1,1], [1,1,1]])[1][1], 0, 'test 8'); t.end(); });