Search the Community
Showing results for tags 'structure'.
Found 1 result
I am writing a program with a central while-loop. The loop has if-statements that call methods. I am caught between 2 situations: 1) My methods contain while loops 2) Create a boolean for each method so the main loop runs the method until the boolean is satisfied Problem with 1): Methods gain full control - while the method is in control, the main loop can't make other checks such as run toggling Problems with 2): There are a very large amount of booleans. Complex methods must be broken up into simple tasks, creating more methods