I have six boolean flags that are independent of each other so there are 64 possible combinations. These flags should determine the value of some string. This string can have seven different values. I think implementing this as a large if-statement is a bad idea so I thought of creating a truth table where each combination determines a specific outcome:
Key Value
0,0,0,0,0,0 -> "A"
0,0,0,0,0,1 -> "A"
0,0,0,0,1,0 -> "B"
0,0,0,0,1,1 -> "C"
0,0,0,1,0,0 -> "A"
...
This looks remarkably like a dictionary but what would be the best key implementation (in C#)? The smallest possible key would be a byte
that I mask the options into. However, this wouldn't improve the readability of my code.
Are there other solutions for this?