# ICS2O1 culminating - Minesweeper ###### tags: `Grade 10` `ICS` `ICS2O1` ## Description for project A typical game of minesweeper. There is a large grid of buttons representing spaces with some having mines underneath them. The number and locations of the mines is determined before the game beings and do not change once the game has began. The player can left click to reveal a space. If the space has a mine, the player loses and the game ends. Else, the game will display a number on the space representing the number of mines adjacent or diagonally adjacent to that space. If a revealed space has no mines around it, it will instead reveal all spaces adjacent or diagonally adjacent to it. The player can also right-click to flag a space if they think there is a mine there. A revealed space cannot be re-revealed. A player can also use a mouse wheel click to reveal all spaces around an already revealed space. The player wins when all non-mine spaces are revealed and all mines are flagged. The player loses if they reveal a space containing a mine. ## Fundamental features There will be a starting screen and a menu allowing the user to choose the difficulty of the game. The grid size and number of mines will define the different difficulties. Specifics can be determined later. When the user selects the difficulty, a grid of buttons will be generated. The locations of the mines will unique and pseudo-randomly generated. Players will be able to left click a space to reveal it. Players will be able to right click a space to flag it. Players can unflag a space by right clicking an already flagged space. There will also be a displayed counter showing the number of total mines minus the number of flags placed. The game will automatically end if the player wins or loses. A result screen will be displayed. If the player wins, the result screen will show the time it took them to clear the board. If the player loses, the game will also reveal the location of all the mines. ## Other features - will try to implement as many as possible - may add to list when i get more ideas - ranked from highest to lowest priority' **Customizable game size** - User can choose how large the grid size is and how many mines there are. **Mods/Variants** - Toggleable additions to the game to make the game more fun or challenging. Examples include - Hidden - Numbers disappear after a set number of seconds - Hard/Easy - The number of mines is increased/decreased - Timed - User loses if they cannot clear the board within x seconds. - No Fail - The user doesn't lose even if they click on a mine. **Hints** - User can use a hint to reveal the location of a mine. Might make this a mod. **In-game menu** - A possibly pop-up menu that allows user to change difficulty, restart, or exit to the start menu. **Visuals and sounds** - May want to add sound effects to button clicks, background music, and background visuals/wallpapers to make game look nice. ## Limitations and challenges **Left and right clicks** - Since the game needs to register right and left clicks as two different actions, I may have to use a different graphics library. Thinking of tkinter right now because it can also be used for buttons. **Grid** - May have to use a 2d array to represent the grid, especially if the user can customize the grid size. **Spaces with 0 adjacent mines** - May have to run bfs/recursion to reveal spaces adjacent to a space with 0 adjacent mines. ## Avatar ): https://imgur.com/Qgck1iJ