Skip to content

displayPollutedMap()

Omary, Salma edited this page Nov 5, 2022 · 3 revisions

The displayPollutedMap is a void function has the same parameters as the previous function in display.cpp, displayMap: the first being of type Map and the rest being ints representing coordinates within the map. It outputs a map of a given region that consists of numbers in every location that represent the pollution. Also similarly to displayMap, this function has a temp variable of type 2D zone pointer equal to the map grid. The iteration is similar to the previous function and also contains a nested for loop. As the loops iterate through the map grid, top left to right, the pollution in that zone is output. This includes if the pollution is equal to zero in that location (output will be 0).

Clone this wiki locally