After all mines have been discovered, and the
smiley-button has the shades on, you can still unflag
your mines and attempt to clear them. This is messy.
The variable "$dead" needs to be set to "1" in a win
condition and an extra if() added to display all mines
as flags. This will most closely emulate the Windows
version.