can someone help me please
i need to come up with a scenario where you would use a while loop in a shooting game.
Describe the situation using comments.
Tell the user what is happening and what they need to do using a print command# Create a while loop that will allow the user to change/loose points throughout the game.
Explain what is happening in your while loop with a comment.
I guess you can take some inspiration from my target practice game where the draw loop is a while loop that runs continiously and excutes certain functions. to put this into python it would be:
rungame = True while rungame: moveEnemy() background(255) calibration() drawBackground() move() moveEnemy() drawEnemy() drawCars() aDS() gui() hit1() time() rands() swapGun()
in the code above, when you change the variable rungame to false, then it will stop looping.
here is the original code for reference.
(note: this was written in p5.js)
click the checkmark next to my comment if this was helpful!