0
Hello!I want to print out a full minesweeper grid after the loss of the player in c but I can't get the random mines in the grid
This is what I've written: Thank u in advance. https://code.sololearn.com/ctmUg59xrZrp/?ref=app
5 Respuestas
0
Please paste your code in the Code Playground and share the link. It would make it easier for people to help you.
0
So here you have 2 table, game_board for the reference where the mines is and board for player to play and look at, am i correct ?
where o is open * is mine and nothing for unrevealed tiles.
And now you want to print the entire board to reveal which tile are mines and which arent right ?
Just print the game_board
0
Taste thank you for answering. Yes that is right, I tried printing game_board but it doesn't print out both at once 'o' for unopened tiles or '*' for mines and I'm not sure what I'm doing wrong.
0
You really need to work on structuring your code, its kinda hard to read.
Btw.
If the board are used as reference where the mines is, you can first populate them with open tiles before replacing some with mines.
This way you can print the board you're using as reference in the same way as you print the game_board
0
Taste thank you very much!