DavidNHill / JSMinesweeper

Minesweeper player, solver and analyser in javascript
https://davidnhill.github.io/JSMinesweeper/
MIT License
97 stars 22 forks source link

making inputs a little easier in Analysis mode #1

Closed hanshansenrl closed 3 years ago

hanshansenrl commented 3 years ago

love the solver so far, especially the JS one, I would appreciate if we can make setting up boards in Analysis mode a little easier. i have come up with 2 small suggestions for now:

1) instead of left-clicking each and every cell i would love to be able to keep the left click pressed so we fill out larger patches more quickly

2) [an option so that] mousewheel down to set the cell's minecount at first does not take into account flags and mines around it (i.e. first mousewheel down always sets a 1). left click is still there doing it normally then.

i dont know if i missed out on any keyboard hotkeys, i dont think i have found any. would love a hotkey for the "Analyze" button for example.

Obviously these are not github issues but I didnt wanna dig to deep for direct contact possibilities.

Thank you.

DavidNHill commented 3 years ago

I'm pleased you like the analyser and thanks for the feedback.

I'll add "drag to toggle hidden/revealed" to the JS version. This will allow you to hold the LMB down and it will behave as if you'd clicked each tile the mouse passes over when dragged.

I'm less inclined to change the current way the tiles value is done. Not allowing the value to violate the mines/spaces around it helps prevent illegal boards being created. If the board is setup in the order; hidden/revealed, flags and finally values then this shouldn't be a problem. Feel free to say what benefits you think it would give.

Currently there aren't any hotkeys, I'll see if I can set one up for the analyze button.

hanshansenrl commented 3 years ago

thanks for the updates.

about 2) i think my problem only happens in analyse -> efficiency. when copying a board into the analyzer and analizing it step by step (as tedious as this might sound and is lol) mouse wheel down often "guesses" one mine too many and i have to correct it each time, idk how to describe it (maybe a conflict between flags and guaranteed unflagged mines??) and im not seeing a pattern. this is NOT about allowing to set an illegal mine count when more flags are set around a cell.

Thank you.

DavidNHill commented 3 years ago

I've made a few adjustments and added the hotkeys 0-8 and 'f'. Can't say with any confidence that this will solve the issue you have, but it might make it better. Let me know either way,