BullCow Game doesn't end game [Solved]

For some reason the if (Lives <= 0) is not executing and the game doesn’t end when the player runs out of lives. For some reason it keeps on decreasing life and go into the negatives.

switch the symbol from less than to greater than Lives >=0

On line 76 you have a return statement which is going to exit the function. Nothing below that will ever be executed.

ah thank you, that fixed it!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms