Solve the minesweeper problem