{ "function": "lifeStep", "cases": [ {"name":"an-empty-board-stays-empty","args":[[]],"expected":[]}, {"name":"a-lonely-cell-dies","args":[[{"x":5,"y":5}]],"expected":[]}, {"name":"two-cells-die-of-loneliness","args":[[{"x":5,"y":5},{"x":6,"y":5}]],"expected":[]}, {"name":"a-block-is-stable","args":[[{"x":5,"y":5},{"x":6,"y":5},{"x":5,"y":6},{"x":6,"y":6}]],"expected":[{"x":5,"y":5},{"x":6,"y":5},{"x":5,"y":6},{"x":6,"y":6}]}, {"name":"a-horizontal-blinker-turns-vertical","args":[[{"x":4,"y":5},{"x":5,"y":5},{"x":6,"y":5}]],"expected":[{"x":5,"y":4},{"x":5,"y":5},{"x":5,"y":6}]}, {"name":"a-vertical-blinker-turns-horizontal","args":[[{"x":5,"y":4},{"x":5,"y":5},{"x":5,"y":6}]],"expected":[{"x":4,"y":5},{"x":5,"y":5},{"x":6,"y":5}]}, {"name":"three-cells-in-an-l-give-birth-to-a-block","args":[[{"x":5,"y":5},{"x":6,"y":5},{"x":5,"y":6}]],"expected":[{"x":5,"y":5},{"x":6,"y":5},{"x":5,"y":6},{"x":6,"y":6}]}, {"name":"a-cell-with-four-neighbours-dies-of-overcrowding","args":[[{"x":5,"y":4},{"x":4,"y":5},{"x":5,"y":5},{"x":6,"y":5},{"x":5,"y":6}]],"expected":[{"x":4,"y":4},{"x":5,"y":4},{"x":6,"y":4},{"x":4,"y":5},{"x":6,"y":5},{"x":4,"y":6},{"x":5,"y":6},{"x":6,"y":6}]}, {"name":"a-glider-moves-and-the-result-is-sorted-row-major","args":[[{"x":1,"y":0},{"x":2,"y":1},{"x":0,"y":2},{"x":1,"y":2},{"x":2,"y":2}]],"expected":[{"x":0,"y":1},{"x":2,"y":1},{"x":1,"y":2},{"x":2,"y":2},{"x":1,"y":3}]}, {"name":"a-block-in-the-corner-is-stable","args":[[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1}]],"expected":[{"x":0,"y":0},{"x":1,"y":0},{"x":0,"y":1},{"x":1,"y":1}]}, {"name":"a-block-in-the-far-corner-is-stable","args":[[{"x":38,"y":28},{"x":39,"y":28},{"x":38,"y":29},{"x":39,"y":29}]],"expected":[{"x":38,"y":28},{"x":39,"y":28},{"x":38,"y":29},{"x":39,"y":29}]}, {"name":"a-blinker-on-the-top-edge-cannot-grow-beyond-it","args":[[{"x":4,"y":0},{"x":5,"y":0},{"x":6,"y":0}]],"expected":[{"x":5,"y":0},{"x":5,"y":1}]}, {"name":"a-blinker-on-the-right-edge-does-not-wrap-to-the-left-edge","args":[[{"x":39,"y":9},{"x":39,"y":10},{"x":39,"y":11}]],"expected":[{"x":38,"y":10},{"x":39,"y":10}]}, {"name":"cells-on-opposite-edges-are-not-neighbours","args":[[{"x":39,"y":9},{"x":0,"y":10},{"x":39,"y":10},{"x":39,"y":11}]],"expected":[{"x":38,"y":10},{"x":39,"y":10}]}, {"name":"a-blinker-on-the-bottom-edge-cannot-grow-beyond-it","args":[[{"x":10,"y":29},{"x":11,"y":29},{"x":12,"y":29}]],"expected":[{"x":11,"y":28},{"x":11,"y":29}]} ] }