ok so now i need to write C++ function called paver enemies where all enemies can approach to the castle 1 meter every time step only if next meter is paved. there are 2 type of enemies 1- normal who hit castle 2-paver whose job to pave road for 1 to hit castle. the last 30 meter before castle are not paved and only paver enemies can enter and paved it so 1 can enter paved distance in next time step. any help would be appreciated thanks
I have no idea what you are talking about. Is this the question as it was given to you, or is it your interpretation of the question? If the latter, please post the original question without any editing. Also please post an example of the input you might give the function and the output you might expect, explaining why that output would be expected. On the face of it it appears extremely trivial: for M=30 to 1 paver advance to M+1 and pave M everyone advance to M now that it's paved end loop now everyone is at the castle they can hit it.