Minesweeper: An Introduction

SamFan
Computer Systems MFACA
8 min readOct 31, 2023

Part 1. Introduction

Minesweeper is probably one of the most famous games on personal computers in history. For anyone with a Windows operating system, it is highly possible that they have played the game at some point.

A Minesweeper Board

As a typical Windows user who found this game very confusing as a kid, I stumbled upon the game again in 2022. And after learning the rules, I realized that this game is actually much more interesting than I imagined, and quickly became obsessed with it. Thus, I hope more people can see the beauty that lies in this game.

In this article, I will be introducing the game from two different angles. The first part is going to be about the game itself, including the gameplay and how the game works. And then I will be focusing on the game’s history and culture, including its big community, that is sometimes overlooked by players of the more modern games.

Part 2. The Game Called Minesweeper

The rules of the game are very straightforward. And though some people would claim that the game depends fully on luck, that is not actually the case. In the game, a rectangular array of squares is shown on the gameboard. With a click, the contents of the clicked square are revealed. It could contain a mine, which means the player loses; or it could be a number from 0 (often null) to 8, showing the number of mines there are in the adjacent tiles of the clicked one.

In most cases, the game prevents the player from hitting a mine with the first click, by moving the mine to adjacent tiles. The number of all the mines is known beforehand, and the player’s goal is to open up all the tiles without mines. The player can use flags to mark tiles they think contain a mine, but the winning condition doesn’t require the mines to be flagged out. There can be cases when the position of mines can’t be concluded and the player can only resort to luck, but some of the Minesweeper games include a non-guessing mode to prevent this from happening.

There is also a function called chording in Minesweeper. When a player has marked out all the mines, they believe there is in the area adjacent to a certain number, they can press both mouse buttons at the same time to reveal all the unmarked tiles. However, if they had made a mistake in marking, the mines that hide in the unmarked tiles would explode.

There are quite a few strategies and patterns found by the Minesweeper community. The patterns mean a certain array of numbers that leads to only one solution. Remembering them can save time, and most players begin their journey by learning the basic patterns. I would like to introduce some of the most widely used and the easiest patterns.

The most basic pattern in minesweeping is probably the 1–1 pattern. As we know that there must be a mine in the two yellow squares adjacent to the 1 on the left, and there can also only be 1 mine in the 3 squares next to the second 1, the pink square must be safe.

The 1–1 pattern

The most famous patterns in the minesweeping world are the 1–2–1 and 1–2–2–1 patterns . It’s easy to understand how these patterns work. In the 1–2–1 pattern, there is only one mine in the 3 squares in the area of the 1 on the left. As the 2 in the middle shares two squares with the 1, the extra mine the 2 owns must be in the tile that it doesn’t share with the 1, which means we can mark out the tile. And the same logic applies to the 1 on the right. Therefore, we can conclude that there must be only 1 solution to this pattern.

The 1–2–2–1 pattern can be concluded with similar logic. The 1 on the left of the first 2 shares the same 2 tiles with the 2, meaning the extra mine must go to the extra tile of the 2. Apply the conclusion to the 2 on the right, and then we can get the solution of the pattern.

1–2–1 pattern (please notice that the borders of the picture are not game board edges, just cut off)
1–2–2–1 pattern (the edges also cut off)

· How is the game made?

The process of making the game is pretty straightforward. First, we need to create a game board with mines in it. We need to initialize a square array and put randomized mines into the array by generating random coordinates of the mines. Then, we determine the number that should be shown in each cell. This can be done by adding 1 to each cell every time we find a bomb adjacent to it. By now, we should have a map of the game.

To make the game playable, we need to get the input from players. As the two buttons of the mouse each have different functions, both of the mouse messages should be processed, left key for opening a square, and right key for marking it.

Also, in Minesweeper games, we often face the situation when one click on an empty tile can open a big space of nulls and numbers. We can write a function that checks all the cells near the empty one, and open them if there’s no mine near.

Finally, we need to decide the results of the game. As players detonate a mine, the game ends. So, we check every time the player clicks on a tile and decide if it’s a bomb. If it is, then the game is over, and the player loses. If not, the game goes on — — — until all the tiles excluding the mines are opened. We can easily check if this is the case by comparing the unopened tiles to the mine numbers. If they are equal, then the player has won.

This Flowchart is Made by Dab On ’Em, The Ohio University

This is a simplified flowchart of the process.

Part 3. History and Culture of Minesweeper

· History

The origin of Minesweeper before its Windows inclusion has been a bit controversial. There are a couple of games that are clearly influential to the Minesweeper, including Mined-Out in1983, a game made for ZX Spectrum, which includes telling the player numbers of adjacent mines instead of showing them where the mines are. The game Relentless Logic, another game believed to have been the inspiration of Minesweeper, could be influenced by Mined-Out as well. Relentless Logic is a DOS game, asking the player to move from the top left corner to the bottom right, and not stepping on any mines in the meantime. There are some clones of Relentless Logic, and one of them, XMines, included a mouse input, which could be an important inspiration for Minesweeper.

In 1990, Minesweeper was officially published in Microsoft’s Windows Entertainment Pack. And from then on, Minesweeper came with multiple Windows systems, which made it known to the whole world.

· Community and Ranking in Minesweeper

For a lot of dedicated gamers in the Minesweeper community, the game is actually a very competitive one. There are multiple tournaments of Minesweeper happening in different areas in the world, and every player aims for a better score with hundreds and thousands of hours of practicing.

However, when it comes to tournaments and professional rankings, the original Microsoft Minesweeper is actually banned for its cheats and bugs. Rankers use clones instead, which are games with the exact rules as the Windows Minesweeper but allows less room for cheating. There are 3 current clones accepted by the community: Arbeiter, Minesweeping X and Viennasweeper.

There are also certain terms used by the community. NF stands for non-flagging, a way for solving the boards without using flags; while FL stands for flagging, the opposite of NF. And for a fairer ranking environment, the concept 3BV is invented to evaluate the difficulty of a certain board, as not all boards at the same difficulty level are actually equally difficult. 3BV means the minimum left clicks required to clear a board.

However, the Minesweeper community also has a cooperative side. Minesweeper players have built sites like Minesweeper wiki, Authoritative Minesweeper and multiple forums all over the world. In these sites, players share their knowledge, experience and personal scores.

Part 4. My personal favorites in Minesweeper games

As the game is easy to build, there are countless Minesweeper games on all kinds of platforms. I would like to introduce 3 of my personal favorites.

1.Minesweeper Online

As the name suggests, Minesweeper Online is an online platform for the game. The site has a simplistic interface, and provides all kinds of traditional Minesweeper games, including a no-guessing mode on all difficulties and customizable boards. The daily quests, arenas and ranking make the game more challenging and fun. It has also got a chatting function, where you can get to know gamers from all over the world.

Minesweeper Online

2. 14 Minesweeper Variants

The game is by far my favorite of all the Minesweeper games, and I would recommend it to anyone who is interested in not only Minesweeper, but all kinds of puzzle solving games. It is a fully non-guessing game to the point that any guessing would immediately lead to losing the game, and there’s so much more than just 14 variants. It’s such a special game with so many different rules for players to explore that I think it would really be a shame for any puzzle game lover not to try it out.

14 Minesweeper Variants

3. Mineswifter

Mineswifter is a mobile Minesweeper game with beautifully made user interface and a fully non-guessing gameplay. It provides 3 different difficulty levels with multiple daily challenges. The game allows you to redo whenever you detonate a mine, so it’s very friendly for beginners. Try this out if you’re looking for a mobile Minesweeper game.

Mineswifter

Part 5 Conclusion

Minesweeper has a history of more than 30 years now, and it still attracts players from all over the world. I hope this article could bring more people to become interested in this simple, beautiful and classic game.

References:

Minesweeper-More than Just a Computer Game by Gez. Fritz Löhr

2. MinesweeperWiki

3.MineSweeper Flowchart by Dab On ’Em | FEH SDP16 B15 (osu.edu)

4.This Is How To Create A Simple MineSweeper Game In Python! | by Leonard Yeo | The Startup | Medium

--

--