F. Discussion

Brainstorming

Our process began by brainstorming ideas for what game our team should program. The idea of minesweeper was brought up as a fun and relatively simple game to make. We decided to make the size of the field customizable to add some fun for the user.

 

Planning

We then formulated the first plan and created a flowchart. We originally planned to use a figure to display a clickable minefield, but this idea had to be changed to a command window minefield. This was due to the complexity of programming changing figures and clickable buttons with changing coordinates.

Version 1

The first playable version of the game was played by creating options to type x and y coordinates and typing 0 or 1  upon being asked to flag or to check. This method was used to test the checkSelected and flagSelected functions, and for general bug testing before proceeding to add more features, such as recursion and keyboard button control.

 

Version 2

The next version was an attempt at implementing recursion into the game. This took a lot of testing, debugging, and researching to pull off. The main issue we ran into was creating infinite recursion. After a bit of time, I came with the idea to track what boxes have been checked in an array and code the function to only run on unchecked boxes, eliminating the infinite recursion.

 

Version 3

Keyboard button control was implemented, sound effects were added, and extra user instructions were added. Additionally, the minefield display was made to be more spread out for smaller minefields for ease of vision. It took a while to figure out that we had to use the function strcmp to compare strings that are generated by pressing keyboard buttons.