complete-javascript-course icon indicating copy to clipboard operation
complete-javascript-course copied to clipboard

05-Guess-My-Number Test Case

Open KaranG08 opened this issue 3 years ago • 2 comments
trafficstars

After successfully guessing the secret number, we can still change the guess and the game continues.... Leaving the background green (winning screen) and the score getting reduced till 0 Leading to Win and Lose at the same time Screenshot 2022-01-18 001511 sd .

KaranG08 avatar Jan 17 '22 18:01 KaranG08

In my case, I personally implemented a different approach.

I hid the "Again!" button from the start (since there is no point in it being visible). Once the game finishes, I hide the "check" button, and display the "again" button in its place.

Since, the "check" button would be hidden, the player can't continue playing the game any longer (they have to click "again" to play again).

I'm guessing Jonas didn't use such an approach because he shows working with CSS classes (hiding objects etc.) later in the Modal window project. But it could be introduced in this guess my number game as well.

pranav-kural avatar Jan 25 '22 12:01 pranav-kural

Kinda a bug. Jonas did implement this in the Pig game in which after reaching 100 points we couldn't click on hold or roll buttons. Thus, in this way the buy will be fixed .

Aditya-Bhate avatar Feb 17 '22 02:02 Aditya-Bhate