How I wrote a command-line Minesweeper game with Python in 30 minutes which is packaged as a Docker container
I know it is not a big deal writing a minesweeper game but it is still a thing, if you write it in 30 minutes, right? :)
I will share the repository but first, let me explain how it started. It all started in a technical challenge, it has been asked for creating an “X” by “X” matrix and put “M” amount of “A” letter in it randomly.
I have created some for loops and created the matrix first then created another function for creating a list of random numbers in the range of 0 to (X*X) depending on the mine counts (M) and completed these in approximately 5 minutes.
After that, it has been asked to put the numbers into the cells depending on the mines around them which don’t have mines in them. So this challenge became creating a simple minesweeper game. This part took some more time. :)
Then I had a code which is some kinda part of a minesweeper game. So I decided to work further on it to create a command-line minesweeper game! Of course, it took more than 30 minutes later to polish it a bit and add some simple CI to push it to the docker repository but anyway the main skeleton was ready in 30 minutes.