Skip to main content
Post Closed as "Needs more focus" by House
Source Link
userx01
  • 346
  • 2
  • 12

Minesweeper number placement

My professor gave us a project: make a minesweeper clone. However, he said that he will give bonus points for the 3 fastest algorithms for board generation. I'm currently doing the algorithm that places the numbers. How should I do it? I thought of doing something like

For every mine, increment the value of adjacent cells

or

For all cells, count the number of adjacent mines

Which is faster? Or could you recommend a faster method? Thanks