Game Of Life written in angularjs