Best way to combine a permutation of conditional statements
问题 So, I have a series of actions to perform, based on 4 conditional variables - lets say x,y,z & t. Each of these variables have a possible True or False value. So, that is a total of 16 possible permutations. And I need to perform a different action for each permutation. What is the best way to do this rather than making a huge if-else construct. Lets see a simplified example. This is how my code would look if I try to contain all the different permutations into a large if-else construct. if