Learning AngularJS making a simple game