Creating a tetris clone in JS and angular.js