Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the code in c programming language. Note: Please write the full and correct code that works i already ask this question but your expert
Write the code in c programming language.
Note: Please write the full and correct code that works i already ask this question but your expert has written the code incomplete and incorrect.
PROJECT MINESFIELD
Minesweeper is a game in which a player explores an area where mines are hidden and reclaims the area. It is a strategy game in which he tries to reveal the remaining part safely. Actor usually in an area varying in size from xeasyxmedium or xdifficult It moves forward and opens the squares. Each square that opens either indicates that there is a mine underneath or
It refers to a number indicating the total number of mines in the eight surrounding squares. If the player opens a square containing a mine, they lose the game.
Game logic, twodimensional arrays and Can be operated using user input. During the game, players open squares and collect mines. Tries to guess their location. As each square is opened, it is updated like a playing field and offers new information to the player. information is given Figure The game is won when all minefree squares are cleared. Game such as loops, conditional statements, functions, arrays and error checking during the development process. elements are important. Careful efforts to develop a userfriendly and compliant game Design and careful study are essential.
You need to pay attention to the following features in the Minesweeper game:
: You can use a twodimensional array of numbers as the game board. Each square or one
with a number representing the mine or the number of mines around that square. is shown. For example; If there are three mines in eight squares around a square, The number is used.
: The game should prompt the player to make a move by displaying Enter a move: If the coordinates entered by the player are a valid move, this move is displayed on the board. should be performed and the results should be reflected on the screen. For example; User BWhen entered, the move in this coordinate must be made and the status of the square open mined or minefree should be checked.
: A system that will keep track of the total number of moves made by the player and the number of correct guesses. There should be counters and these counters should be updated on the screen after each move.
: When an illegal move is made ie when a player chooses a previously opened square The program detects this situation, warns the player and enters a valid move. needs to ask again for
: After each move made during the game, you can view only the most current state of the playing field. The output should be edited to show.
Note: Write the full and correct code i dont need the step of the codes i need a correct and full code that workds.I already asked this question but your export has written incomplete and wrong code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started