7 ms·
Unrealistic; in minesweeper it's impossible to hit a mine on your first click. ;) https://gaming.stackexchange.com/questions/315335/is-it-possible-to-hit-a-min
by schiffern 2y ago
Unrealistic; in minesweeper it's impossible to hit a mine on your first click. ;)
https://gaming.stackexchange.com/questions/315335/is-it-possible-to-hit-a-mine-on-first-click https://gaming.stackexchange.com/questions/315335/is-it-poss...
- praptak 2y agoIt's "an irresistible force meeting an immovable object" type of situation.
- CobrastanJorji 2y agoYour link suggests: "If a mine is under the first clicked tile, it is moved to the upper-left corner, if the upper left corner is occupied, the mine moves to the right of the corner tile." If that happened here, the square would still be a mine.
- raldi 2y agoWhat if the upper-left corner and the one to its right are mined?
- bwen 2y ago"The function checks if it is the first click, and that the square being clicked is a mine. It then tries to move the mine to the upper-left corner. If unsuccessful it tries the square to the right of it. If all of the first row is occupied by mines, the function tries to put the mine in the leftmost square of the row below, and so on." https://web.archive.org/web/20180618103640/http://www.techuser.net/mineclick.html https://web.archive.org/web/20180618103640/http://www.techus...
- throwawayk7h 2y agoWhat does the function do if the entire board is mines?
- jraph 2y agoAn array out of bounds access.
- dutzi 2y agoIt BSODs!
- berkes 2y agoFound the tester :) 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.
- j5155 2y agoSee https://www.youtube.com/watch?v=0-REcpPz3vw https://www.youtube.com/watch?v=0-REcpPz3vw It causes some strange bugs to occur!
- lelanthran 2y agoWhat a convoluted solution. 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?
- Shadowed_ 2y agoI don't know for sure, but they probably didn't plant it at first and later it was simpler to move mine elsewhere than to change the way mines are generated.
- SAI_Peregrinus 2y agoProbably performance. It's an old game, it seems faster if the mines can get generated before the user first clicks, and then move the mine if their first click was on a mine. If you wait for them to click to generate then the entire generation step has to run before the user notices.
- KHRZ 2y agoIn Minesweeper you also win when all non-mine tiles are revealed.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]