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