Variation of Conway's Game of Life in javascript and angular