Game of life with AngularJS