Fifteen puzzle game in AngularJS