This is the format of the mine layout, take in a grid size then give the grid
Here is my java code. I made static methods so just creating an instance of MineSweeper will return the answer.