79248357

Date: 2024-12-03 16:12:49
Score: 1.5
Natty:
Report link

add a variable to tell if you have the power-up, then set it to true when you run the function that activates your power-up. In the didBegin function, you should then add a guard else { return } statement with the conditional being the variable name == true. The only thing to be careful of is to set the variable back to false when the power-up is disabled, or the power-up will continue forever. (just to be clear, this is in 2024 with slightly outdated swift 5.5. I am guessing that a solution didn't exist in 2014, but I don't know as that was before I was born!)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: justAkid