Hey there just finished with my portfolio Project I made a mini minesweeper game. I originally wanted to make it bigger but realized that it would take way more time than I had. Give any feedback you have on the project.
Looks like a good start!
The code runs, and fulfills its intended purpose but the code doesn’t handle errors gracefully. You can make a guess that does not exist in the grid. For example:
A1 A2
B1 B2
There's one bomb!
Don't set it off
Choose which grid reference from above: X9
X9 is safe
Try to add a way to give a response to the user to let them know that is not a valid option. Don’t for get to have the error response not progress the game. So, if your first guess is “X1” and you get an error the game will ask what your first guess is. Also, don’t for get that in Python “A1” is not equal to “a1”.
The UI should be made to be a bit more readable. Try adding a newline before each new prompt or response. Could even go old-school and give it some ASCII art for flare.
Lastly try to expand the code a little:
- What if you asked the user what grid size they wanted to play with? (2x2, 3x3, 5x5, ect)
- What is there more bombs, and how could you ensure they are placed randomly without overlaps?
-
- This could also include a user input for a difficulty selection. How would this scale with different sized grids?
- The Challenging One: Try to refactor the code to use classes, methods, and objects. This will help organize the code better and showcases an understanding of object-oriented programming (OOP). (Don’t for get the code comments)
I hope this is helpful, and not overwhelming. All the best
Thanks for the feedback I’ll give it a try and see how I go.