Following http://www.ng-newsletter.com/posts/building-2048-in-angularjs.html