Is it possible for some unlucky guy to hit a mine when they click the first square randomly?
It is impossible to click a mine on the first click, at least in Windows 98. 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. It does not appear the behavior has changed since then.
No, it is (normally) not possible to hit a mine on the first click in Microsoft's implementation of Minesweeper.
It is pretty easy to convince yourself that it is impossible to lose on the first click. Here's a test that I do to gauge the quality of other Minesweeper implementations: Run Minesweeper, create a custom game, and set the board size and number of mines to their maximum allowed values. The Windows 7 version of Minesweeper allows a 24x30 board with 668 mines (92.7% of the board). Start a game, click a random square. Create a new game, repeat. Do it a few more times. The probability that all your first clicks happen to be lucky quickly gets very small (e.g., after 5 times, the probability that you got lucky on all your first clicks drops to (1 - 0.927)5 ≈ 0.000002). Since that is so improbable, the game must be guaranteeing that the first click is always safe. (If that low probability doesn't convince you, keep repeating until it's low enough that it does.)
Additionally, on Windows 7 and later, if you choose to restart a game (with tips enabled), Minesweeper shows a message:
The mines are in the same position as last game. Be careful! You can lose on the first click.
The last sentence implies that normally you cannot lose on the first click.
Finally, as noted in another answer, old versions of Minesweeper had an
xyzzy cheat code that indicated whether a square contained a mine. However, when enabling this cheat, clicking on a square that is reportedly a mine will not reveal a mine for the first click, providing further evidence that the game has special logic to prevent a first-move loss. (I have verified that this is true at least as far back as Windows 3.1.)
Yes, in older versions of Windows.
In versions of Windows up to XP Service Pack 3, if you hold shift and type "XYZZY", release shift, then hold shift again, you can hover your mouse over each square in turn and see whether it has a mine or not by looking at the upper-left corner of your screen (source: Wikipedia). Clicking on a mine will lose.
protected by Jutschge Aug 7 '17 at 15:19
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?