Minesweeper

My very first programming assignment for Introduction to Python (CSCI 1133) was to make a minesweeper game. In order to win, you must not click any on red squares since they contain bombs, which you don’t want to get. To help you win, there are hints on gray squares that let you know how many bombs are adjacent to that specific square. Each square has eight adjacent neighbors.

Creating my very first programming language, Python, through the Turtle framework is challenging. However, by looking at the Turtle documentation, it helps me very much on how to navigate by giving examples of every function, which allows me to learn very quickly and complete the assignment a week prior to the deadline.

Another challenging part of the assignment is to use recursion because some squares are not very helpful, such as the gray ones that do not show the hints. In order to complete this project, I must check all of the adjacent neighbors to see if there are any possible squares that don’t have numbers attached so that the green squares can change to gray. The recursion is finished when the outsides of the adjacent neighbors are filled with hints.

What is cool about this project is that I can see the progress/changes of the code from the Turtle game application, which allows me to execute and run the program whenever I need to fix or add something. Another great thing is to actually enjoy and play the game when it is completed. For me, I think Python and Python’s turtle framework are very useful and will be helpful to those who are new to programming.

Links