Knochenmark / minesweeper

Minesweeper Game
https://knochenmark.github.io/minesweeper/
3 stars 1 forks source link

fix: double-click perimeter reveal only if sufficient flags #113

Closed wtho closed 5 years ago

wtho commented 5 years ago

There was a bug that when double clicking a field, the perimeter reveal was triggered, no matter if the surrounding fields show sufficient flags or not.

This was solved now by adding a check on the surrounding fields before actually triggering all these fields.

Furthermore all any types were avoided by adding more typings to the code.

Closes #112

Knochenmark commented 5 years ago

@wtho Looking good. Also thanks for fixing the typings, there were just 2 minor issues. Shadowed variables on the destructuring for the position and for the array types it recommended to use a generic.