Creating 2048 game using AngularJS