aaronnech / Who-Wants-to-Be-a-Millionaire

A simple client side web application(JS, HTML5, CSS) that plays a game of Who Wants to Be a Millionaire
61 stars 62 forks source link

Wrong Answer change #3

Open Jcmaster opened 8 years ago

Jcmaster commented 8 years ago

Hello, i really like and appreciate this project and your effort, i'm using it to help my nephew with school so he has a simple and fun way to learn basic things, the thing is that my nephew answers wrongly most of the times and the games ends and he has to re-start the game and go trough all the questions that he got right to get to the question he got wrong, i managed to make the game not end when you answer wrong so he can continue with the questions, but the money still counts, i was wondering if i can modify something so the game still does not end when answering wrong but you dont get money, i copied the last part of the right answer and pasted it at the end of the wrong answer and deleted the part that fades the game, the wrong answer code i modified looks like this: // Executes the proceedure of guessing incorrectly, losing the game. self.wrongAnswer = function(elm) { $("#" + elm).slideUp('slow', function() { startSound('wrongsound', false); StopSound('background', false); $("#" + elm).css('background', 'red').slideDown('slow', function() { self.transitioning = false; { self.level(self.level() + 1); $("#" + elm).css('background', 'none'); $("#answer-one").show(); $("#answer-two").show(); $("#answer-three").show(); $("#answer-four").show(); self.transitioning = false; } }); }); } the original as you wrote it is like this: // Executes the proceedure of guessing incorrectly, losing the game. self.wrongAnswer = function(elm) { $("#" + elm).slideUp('slow', function() { startSound('wrongsound', false); $("#" + elm).css('background', 'red').slideDown('slow', function() { $("#game").fadeOut('slow', function() { $("#game-over").html('Game Over!'); $("#game-over").fadeIn('slow'); self.transitioning = false; }); }); }); } i hope you can help me and thanks again, this is helping my nephew and myself a lot

seekersapp2013 commented 8 years ago

I would also like to know how to increase the question from 15 to 20. Thanks for the wonderful job.