Closed yukitakahashi1 closed 4 years ago
Hi Yuki,
Thanks for pointing this out. There is a mistake in the solved()
function.
The &&
in the condition in line 213 of Game.html
should have been ||
, i.e. "or" instead of "and".
The wrong condition reads:
if (r !== rows - 1 && c !== cols - 1) {
Correct would be:
if (r !== rows - 1 || c !== cols - 1) {
I have updated the code in the repository to fix the mistake. Sorry for the inconvenience!
I see, yes, it now works properly. Thanks a lot Christian!
Hi Christian, I'm sorry to ask you several questions, but as I tested the program, I found that it occasionally considered unsolved puzzles as solved (please see the attached screenshot). Do you have any idea why this occurs? The screenshot and the codes below are from the single-player version with history tracking, but I also encountered this behavior in the two-player version.
The following is the set of boards I used to get the screenshot and the screenshot is from the last board.
The following is the history list.