-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
battleship game in chapter 2 is flawed !!! #8
Comments
Good work! You found the bug :-) This is the bug we find on page 70. |
I’ve been racking my brain on how to fix it. Reset the counter after each guess? |
Or go on to Chapter 8 :-) |
Hello, can you please explain to me what is wrong? var location1 = 3; while (isSunk == false) {
} |
The code used in battleship game has a very serious bug using which a person can win the game even by getting his one HIT correct.
For example if the battleship is present at indices 2,3 & 4.And I come to know by guessing that there is a HIT at 3 then,I can enter "3" two more times and win without even caring about other HITS.
The text was updated successfully, but these errors were encountered: