I want to make a simple text program based on the game minesweeper that asks for the number of columns and rows, and asks for the number of mines then create the gameboard with the number of mines scattered throughout on standard output. Any help?

1. Think of a structure that you could use to store a number of rows and columns of "something"
2. Make sure the number of mines cannot be larger than that structure.
3. Think of a suitable way to display your board. i.e. a mine as a * symbol etc.
4. Randomly place each mine inside the structure, making sure to check that a mine cannot be placed in a position that already has a mine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.