Jan-18-2019, 10:07 PM
I don't think that's the best. My example, for instance, gives errors if all three are False.
But I do think that some variation of the "command" pattern would work very well here. A good explanation of the pattern can be found here: http://gameprogrammingpatterns.com/command.html
That link is part of a book of game design patterns, but a lot of what's in there applies to general programming as well. Also, the code is c++, but the explanations are what you should be worried about, not the code.
But I do think that some variation of the "command" pattern would work very well here. A good explanation of the pattern can be found here: http://gameprogrammingpatterns.com/command.html
That link is part of a book of game design patterns, but a lot of what's in there applies to general programming as well. Also, the code is c++, but the explanations are what you should be worried about, not the code.