JSMinesweeper icon indicating copy to clipboard operation
JSMinesweeper copied to clipboard

Adding-removing flag doesn't always return to the same state

Open NooneAtAll3 opened this issue 1 year ago • 2 comments

I think the analyzer differentiates between user-added and automatic numbered cells - so if you add a flag, it doesn't change user-made numbers

But removal of flag doesn't always do that - mismatch happens when cell gets fully saturated

To recreate the bug:

  1. make this map in analyzer: 2*2 F**

2 for number 2 * for hidden F for flag

  1. right click the cell right of F
  2. right click same cell again

What should happen: both 2s are the same, so they should get affected (or not get affected) same way What actually happens: left 2 turns into 1 when flag gets removed. Right 2 doesn't change


It's a tad annoying when I set up position, make variations back and forth - but the board changes under me

NooneAtAll3 avatar Feb 22 '25 17:02 NooneAtAll3

This happens when you are in "build mode". If you have finished creating the layout and want to place / remove flags without affecting the revealed values, then turn off "build mode".

If you don't think this solves your issue then let me know.

DavidNHill avatar Feb 22 '25 18:02 DavidNHill

my concern is 1)the unevenness and 2)non-return to the same state

why 2s in the example have different behaviour despite being themselves the same and getting applied the same actions?
why adding and removing a flag - quick action combination that returns to the same board in all other cases - doesn't leave me back where I started?

condition for the behaviour change is hard to recognize on the fly - and the attention is usually on the flag, not cells around it (or flags around those cells)


I agree that build mode explanation covers my concern of "set up position - move back and forth after it".
But it leaves a gap of setting up position with mistakes - or needing to slightly change it after


it feels like it's a feature, "un-userifying cells not on the edge" or smth
made so that cells inside the already-solved region needlessly given by user would get removed easily when removing flags

but in that case, imo, it'd be more intuitive if it doesn't happen when affected number still has hidden cells around it

NooneAtAll3 avatar Feb 23 '25 01:02 NooneAtAll3

I changed this to consistently raise or lower the values around the placed flag.

DavidNHill avatar Mar 12 '25 09:03 DavidNHill