Last active
August 29, 2015 14:22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Any live cell with fewer than two live neighbours dies, as if caused by under-population.', function () { | |
it('should kill cell with no live neighbours', function () { | |
game.setCell(3,3); | |
game.nextFrame(); | |
expect(game.grid()[3][3]).toBe(0); | |
}); | |
it('should kill cell with one live neighbour', function () { | |
game.setCell(3,2); | |
game.setCell(3,3); | |
game.nextFrame(); | |
expect(game.grid()[3][3]).toBe(0); | |
}); | |
it('should kill cell with one live neighbour in the previous row', function () { | |
game.setCell(2,2); | |
game.setCell(3,3); | |
game.nextFrame(); | |
expect(game.grid()[3][3]).toBe(0); | |
}); | |
it('should kill cell with one live neighbour in the next row', function () { | |
game.setCell(4,4); | |
game.setCell(3,3); | |
game.nextFrame(); | |
expect(game.grid()[3][3]).toBe(0); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment