News for hackers. Stuff that matters.
Re:1M Cell Minesweeper by mkl on Wednesday October 14, 2020 @07:06AM (#24775260)
Even simpler still is to just move any mine clicked on in the first move into an empty square before processing the clicked square as normal.
Re:1M Cell Minesweeper by dmurray on Wednesday October 14, 2020 @09:09AM (#24776069)
This is what actually happens in the Windows original (it doesn't look for a random empty square, it tries them in reading order starting from the top left).
Re:1M Cell Minesweeper by lifthrasiir on Wednesday October 14, 2020 @08:39AM (#24775815)
That needs a list of empty cells, otherwise you need to retry and get the same issue as the map-wide regeneration.
Re:1M Cell Minesweeper by mkl on Wednesday October 14, 2020 @09:02AM (#24776015)
Well you have all the cells in an array so that's easy enough. Pick a cell at random until you find an empty one, which won't take long. There's no regeneration, just moving one mine to an easy to find place.