diff --git a/README.md b/README.md index dcfcfcd..e62c88b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # Diversify your music taste +This is a game that will help you broaden your taste in music. + # How to get started -- Clone the repo -- Start an HTTP server in the root of the repository. Some people like ``python -m SimpleHTTPServer`` -- Visit the server in your web browser of choice +```bash +git clone $THIS_REPO +python -m SimpleHTTPServer +# Visit the page served by the web server above +``` diff --git a/app/controllers/controllers.js b/app/controllers/controllers.js index aaa1e52..1d65790 100644 --- a/app/controllers/controllers.js +++ b/app/controllers/controllers.js @@ -26,6 +26,7 @@ app.controller('januController', ['$scope','$http','$interval', function ($scope // this is the first song the user guesses firstSong = fetchNewSong(); + $('#album-cover').addClass('no-blur'); playSong(firstSong); $scope.gameInSession = true; @@ -33,11 +34,20 @@ app.controller('januController', ['$scope','$http','$interval', function ($scope // start the timer $interval(function(){ timeLeft = getTimeLeft(); - if(timeLeft<16) + if(timeLeft<16){ $scope.timeLeft = timeLeft; + if(timeLeft==15){ + $('#album-cover').addClass('animate-blur'); + } + if(timeLeft==14){ + $('#album-cover').addClass('no-blur'); + } + } else $scope.timeLeft = 15; if (timeLeft <= 0) { + $('#album-cover').removeClass('animate-blur'); + $('#album-cover').removeClass('no-blur'); checkAnswer(); } }, 1000); @@ -158,9 +168,11 @@ app.controller('januController', ['$scope','$http','$interval', function ($scope //clear the selection $scope.currentAnswer = null; - newSong = fetchNewSong(); + newSong = fetchNewSong(); playSong(newSong); $scope.markerSet = false; + $scope.score.round = 0; + } function answerSuccess() { diff --git a/app/partials/game.html b/app/partials/game.html index cff99e7..378fad7 100644 --- a/app/partials/game.html +++ b/app/partials/game.html @@ -1,7 +1,6 @@
- @@ -12,7 +11,7 @@