

I have separated requirements into 2 parts. First thing first let’s go through the requirements. The original title of this kata is “Minesweeper for testing” and the purpose of this exercise is to understand how to build the core of a system without any IO. Next let’s have a look at the specific requirements of this kata, the purpose of this kata is to build a Minesweeper console game. If the centre square is not on the edge of the board, then it has 8 neighbours If it is on the edge but not on the corner of the board, then it has 5 neighbours if the square is on the corner, it has 3 neighbours. Each number indicates the total number of mines within the surrounding neighbour squares. These coloured numbers are the hints that you can get from the game. So you need to use logic to determine where the mines are and avoid clicking on these mine squares. All the mines are hidden when you start the game. The goal is to “reveal” all safe squares without uncovering a mine and blowing up the entire board. What have I learned in this project? I listed some of the main learning content during this time, including foundational knowledge such as Git, c# basics, Four Rules of Simple Design, SOLID, TDD etc.īack to the kata, this is the classic Minesweeper game that people are familiar with - It is a logic game, where the goal is to sweep for mines, and you do this by clicking the squares on the grid. This approach is faster than opening four safe squares individually using the left-click.I made a simple object-oriented Minesweeper console app (a hardcore old school PC game). In the example below, you mark a mine in a corner and then double-click on the circled 1 to open the surrounding four squares simultaneously. This action opens all squares surrounding a square with a number, if you have marked the number of mines around that number.
:no_upscale()/cdn.vox-cdn.com/uploads/chorus_asset/file/13335027/IMG_2870.png)
If you play using flags, employ the “double-click” technique (press the left and right mouse buttons at the same time).

It’s the same with learning patterns-after three years of playing Minesweeper a few hours a day, you don’t have to think about where the mines are when you see these patterns.

At the beginning, it takes a lot of time to recognize every single letter, but after a few years you can read quickly, without any effort. Learning to read these patterns is like learning to read a language. For example, you’ll see the following combinations often. Play Minesweeper long enough, and you’ll learn where the mines are just by looking at the pattern of numbers.
