Declare That the Player Has Lost
Learn to code the game rules and decide that the player has lost.
We'll cover the following...
We'll cover the following...
Define the rules of the game
Let’s now include a condition for the player to lose the game if they haven’t guessed the word in seven tries. Let's have a look at the updated implementation for this requirement.
Count errors
We must count the number of errors. Therefore, we assign the name errors_counter to zero (the value) at line 8.
When we conclude that the proposal is wrong, we recall the value associated with the errors_counter ...