Im creating a minesweeper and just wondering what is the best algorithm to search all the empty cells when the user press the empty cell then grow and limit to the border until it reaches the bomb cell. I planning to use recursive search but probably it will slow the process.
Thanks.
If you’re graphically depicting the detection I’d say it would be best to do it multiple steps (grow the border as you suggest):
That way the user can see it happen which is always good. Mix in some animation and it could be something cool that makes someone hope for it to happen.