Minesweeper got me into development, my first real project was building a minesweeper clone for Android using web technologies. It only sold 3 copies, but it got me a new job making more than twice as much as I made doing graphic design.
My version is called Swine Peeper, and you're trying to find pigs in a field. It's now free if you're interested: https://play.google.com/store/apps/details?id=com.ionicframe...
I guarantee this is both the most literary, and most pun-filled version of minesweeper available.
To anyone who has just barely gotten their feet wet in programming, building a minesweeper clone is a great next step after something like a text-based blackjack game.
Do yourself a favor, don't look up any of the standard solutions for building it. Try weird things, figure it out. I made several completely different systems for propagating clicks through empty squares before I came up with a simple, reliable, and performant solution. If anyone had given me a hint I would have learned half as much.
Minesweeper has an interesting metagame that gets lost with these "improvements". The metagame is played over many boards and the goal is to get the fastest record. Part of doing that efficiently is quickly identifying boards that require guesses, and immediately making those guesses (to avoid wasting time on the board when that time could be spent on a different board).
This is a great example of interactive writing. The playable demos are thoughtfully chosen. One of them even made me laugh.
Kudos to the author.
I disagree with the overall thesis here-- that somehow abstracting away all the randomness of minesweeper makes it less "mechanical." Oftentimes, 1 square's outcome is less likely or even much less likely then another. Even better, sometimes 2 outcomes will be equally plausible, but 1 of them might be expected to reveal more information or to reduce entropy more. After playing enough, most plays become ingrained in you and mechanical-- the problem solving element comes in comparing probabilities.
Was skeptical, but the version at the bottom is quite good. Made me realize how much I can improve my logic in the game.
Turning this into pure reasoning over educated guesses is a nice twist on Minesweeper gameplay. What I want now from it is a way to be able to easily work out the logic "on paper".
So one thing I do is work everything out "as if" I placed a flag or or cleared a spot. I want to be able to put a ghost flag down so that I don't have to remember what the current state of the particular path I'm trying to rule out is.
Otherwise I forget about it the second I look away or it gets complicated.
I can't play sudoku without the ability to put in shadow options, or better yet, have the game do it for me. One can argue that the keeping track in your head is a worthwhile aspect of the game, I think it's not.
Somewhat shameless and off-topic, but I think I might have the unofficial world record in Minesweeper. I played it obsessively as a teenager on a Windows 95 Packard Bell. I was able to get 17 seconds on the largest board.
I never told anyone about it because I didn't think it was a big deal, but a couple of years ago I decided to look up the current world record and it's 23 seconds.
Unfortunately I can't prove it, but anytime Minesweeper comes up in discussion I'm obligated to annoyingly mention it.
"The following is a small, but interesting and illustrative example of a game state that has only one logical solution, but you need to take into account the entire game state to find it:"
Is that really true? You can induce that the squares in the corners are free just by looking at their surroundings.
A version of minesweeper I used to play was called stormsweeper. I think it was written in BBC Basic and ran on RISC OS. Instead of flagging mines, you got to remove them, and the numbers of the already revealed squares were updated. Every few seconds (time depended on what level you were playing) all the numbers were covered back over and all the remaining mines moved up to one square each. Blank squares stayed blank, and they were safe to click on as a mine could not move 2 squares.
Once you had cleared a bit of the screen, if you then got stuck, you could wait for the next storm then some of the mines would likely have moved to a solvable position.
I used to play the game Mined-out on the Dragon 32. You have a start and an exit, and have to tread a path one square at a time travelling between, with clues about how many adjacent mines there are. To spice things up, you get a beast chasing you after a while, down previous paths you've trodden.
Author: http://www.crashonline.org.uk/16/andrew.htm
Walkthrough: https://www.youtube.com/watch?v=VqFWdqaoQPw
Recently I got asked to build a Minesweeper game during an interview onsite for a senior front end position and it was incredibly fun to build. If anyone wants a challenge, try building minesweeper in an hour! Here's my solution: http://jsbin.com/yapifag/1/edit?html,js,output
No one has mentioned this version, but I've been addicted to it for years. It adds an extra level of complexity by giving levels to the mines (monsters) and the player:
> While situation 1 above is kind of neat, it is hardly satisfying to play many such games
Not everyone finds the same things fun; situation 1 is actually quite fun to me! See the rise of interactive comic "video games" which are closer to movies with a small number of branching points, or particle simulators (eg Uzu on iOS).
That final game is crazy hard.
The logical steps needed to solve it requires crazy amounts of concentration.
Make an assumption about where there is a mine, follow its implications until you find an inconsistency and then you know there is NOT a mine there. (however if everything checks out and then you know there COULD be mine there)
see also: (infinite) Minesweeper is turing complete http://web.mat.bham.ac.uk/R.W.Kaye/minesw/infmsw.pdf
A fun way to play minesweeper is to not use marker flags. Instead, start to recognize patterns, and sense the landscape of mines mentally as you go. One nice side effect: Lots less clicking needed.
xyzzy + shift + enter made me look quite smart back in the day.
about the two square playfield: iirc there was a rule that the first click could never be a mine.
Another rainy Friday morning, another shameless plug time!
Someone says "minesweeper", I post my implementation - “bugsweeper”. It's an established ritual.
Here go: http://www.ronilan.com/bugsweeper/
Few notes:
1. This is dated January 2014. It is a job interview homework.
2. The HN community has detected a bug and indicated that it should be fixed. That was done March 2017.
3. There are currently no known bugs.
4. The goal of the game is to find the unknowns.
5. No puns intended.
6. Code: http://www.ronilan.com/bugsweeper/js/bugsweeper.js
7. Have a great weekend everyone!
2015
The Simon Tatham version [1] is great because the puzzle generator eliminates situations that requires random guesses.
1) https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ (scroll down to "Mines")