Skip to content
Snippets Groups Projects
Commit cf245ade authored by Suraj De's avatar Suraj De
Browse files

Update Suraj_Indiv_report.md

parent bc12663e
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,9 @@ This report consists of 4 sections describing the good code, bad code, score wei ...@@ -7,6 +7,9 @@ This report consists of 4 sections describing the good code, bad code, score wei
For the bad code portion, i would like to stress on the chain opening section of MACSmine game. In a traditional minesweeper game, based on the response of a user to select a certain tile, the surrounding areas are affected. For example, if the number underneath the selected tile is zero (logically implying that there are no surrounding mines), then the other tiles around it would be opened, depending on what the tiles are. If the nearby tile is zero again, then the same functionality will transfer to those tiles and the surrounding tiles will be opened as well. This goes on till no such opening results in a zero tile. If the selected option is a number, then only that specific tile will open. For the bad code portion, i would like to stress on the chain opening section of MACSmine game. In a traditional minesweeper game, based on the response of a user to select a certain tile, the surrounding areas are affected. For example, if the number underneath the selected tile is zero (logically implying that there are no surrounding mines), then the other tiles around it would be opened, depending on what the tiles are. If the nearby tile is zero again, then the same functionality will transfer to those tiles and the surrounding tiles will be opened as well. This goes on till no such opening results in a zero tile. If the selected option is a number, then only that specific tile will open.
For this code, i tried to implement the chain thing by creating a loop to check all the surrounding areas. Now, for the surrounding areas, there were three instances which could be possible. For this code, i tried to implement the chain thing by creating a loop to check all the surrounding areas. Now, for the surrounding areas, there were three instances which could be possible.
![Three individual tile section](/uploads/d43d390fd237ea1617fba993af24f12f/image.png)
- For any tile in the middle section, the surrounding areas are represented using 8 locations. So, if we consider numpad 5 as the location of the opening, then keypad numbers from 1 to 9 except number 5 would be the surrounding areas. And respectively all the 8 locations would be opened. - For any tile in the middle section, the surrounding areas are represented using 8 locations. So, if we consider numpad 5 as the location of the opening, then keypad numbers from 1 to 9 except number 5 would be the surrounding areas. And respectively all the 8 locations would be opened.
- For any tile in the left boundary, the surrounding areas are represented with top and bottom tile with the right side tiles. So, if we take the example of 5th to be the opening tile, then numpad 2, 3, 6, 8, 9 would be the neighbours. - For any tile in the left boundary, the surrounding areas are represented with top and bottom tile with the right side tiles. So, if we take the example of 5th to be the opening tile, then numpad 2, 3, 6, 8, 9 would be the neighbours.
- For a tile in the right boundary, the selection is nearly reversed. This time the neighbours are numbers 1, 2, 4, 7, 8 for keypad 5. This is to ensure that this selection doesnt bleed into the next rows. - For a tile in the right boundary, the selection is nearly reversed. This time the neighbours are numbers 1, 2, 4, 7, 8 for keypad 5. This is to ensure that this selection doesnt bleed into the next rows.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment