Game of Life written in angularjs