the file i attached bellow has the code just Copy and paste to your system, any way:
the objective of this code it is to create an application that could be used to simulate a wildfire. Our model is going to be a grid structure using letters across the top and numbers across the left. The letter â€œXâ€ will indicate a normal piece of land that is not developed and that is not on fire. The letter â€œFâ€ will indicate a piece of land that is currently on fire. The letter â€œHâ€ will indicate a piece of land that is developed with a house on it. Finally, the letter â€œDâ€ will indicate a piece of land that was destroyed in the fire.
what i have done already is make functions that create a grid but whats left is the burning bit. i would like for you to use the function i made called “findFire” and use that to make a recursive function to that checks the neighbors of a location on fire. For example, if a specific location is on fire, a recursive function checks to see if each of the adjacent locations are on the map and changes them from whatever they are to â€œFâ€ unless they are already destroyed.
the way this program needs to work is by days so the fire spreads on space over daily like in the example.txt file and the number of days should be entered by the user
1. Fires can spread in four directions, north, south, east, and west. They cannot spread northeast, northwest, southeast, or southwest
2. Fires will spread every day. If the fire is to spread off of the map, it is ignored.
3. If a fire â€œFâ€ reaches a house â€œHâ€, the house is destroyed. A notification of the house being destroyed including the coordinates of the house is displayed and the fire continues as a normal fire. For example, a fire reaches a house in C2. A notification to the user says, â€œA house was destroyed in C2.â€
4. Once a fire exists on the map for one day, it is destroyed and should be indicated with a â€œDâ€.
5. Once the entire map is destroyed, the simulator ends automatically and it is closed