Skip to content

Conversation

@noloerino
Copy link

When the user clicks on a flagged square, tiles are no longer revealed. If a flagged square is a zero and would get revealed by an adjacent zero being revealed (but not by a user clicking on it), the flag is still overwritten.

@nicolaschan
Copy link
Owner

Could we just change the client side reveal logic?

Or is there some reason (e.g., consistency) that the server needs to keep track of this?

@noloerino
Copy link
Author

I earlier tried adding an extra check on if (board[parseInt($(this).prop('id').split('-')[0])][parseInt($(this).prop('id').split('-')[1])].flagged, but that field seems not to be updated properly.

@nicolaschan
Copy link
Owner

Ah I see. This is just the initial board that is sent. It doesn't look like the actual state is kept anywhere in except in the CSS and text property of the square. I guess a sketchy way to do this would be to inspect the HTML element of the square and see if that is a flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants