How to Access Class Properties in While Loop

Maybe this is getting philosophical, but this is exactly what my code does.

(Okay, granted, exitLoop should initially be true)

  1. test() is called but exits immediately via return command. (same thing as doing the if in draw() but nicer imho)

  2. the loop is running, using the fact that draw() loops automatically (and calls test())

  3. when exitLoop is true again, test() is left immediately again

1 Like