https://gaming.stackexchange.com/questions/315335/is-it-poss...
I always assumed it did things the way I did when I wrote my minesweeper game: it only generated the mines on the first click, avoiding the clicked tile.
I wonder why they did it that way?
https://web.archive.org/web/20180618103640/http://www.techus...
Jokes aside, I love it how in a group of software engineers someone can always think of an even more unlikely, but somehow realistic edge case.
For me, one of the marks of a senior engineer would be to then either go "we'll just not allow the board to be filled with entirely mines in the builder", or "well, if that ever happens: just let it crash". A practical solution to a theoretical case. Whereas the more junior engineer would spend the next few days researching and refactoring the algorithm to address this case. Obv. "it depends", letting my insuline pump "just crash" isn't cool, but minesweeper, meh.
« The first square you open is guaranteed to be safe, and (by default) you are guaranteed to be able to solve the whole grid by deduction rather than guesswork. »
Anyone know what I'm thinking of?
https://magnushoff.com/articles/minesweeper/
(scroll to the bottom)