I am using a switch statement to determine the proper approach based on the value of a specific variable:
1 2 3 4 5 6 7 8 9
switch (mID) {
case 0://Quit
...
break;
case 1://Chat
...
break;
}
The only problem is, as soon as the number of cases scales to an unmanageable number, it becomes very difficult to keep track of everything. Also, eventually, I would like to change the values for each action (e.g. 0 to quit, change to 183 to quit).