samedi 9 mars 2019

How to design multi level Args user selection which each user selection opens more options starts with argc

i try to think on design for user multi level selection currently is branch of if/else which becomes more complex when adding more choices
for example i have this in my app user have those options when starting the app :

         A            B               C
        / \        /  |  \         / |   |  \
       E   F      B1  B2  B3      C1 C2  C3 C4 
      / \   \    / \   |             /\  
     E1 E2  F1  G1 G2  H1           Q1 Q1 
     /\
    W  W  

as each letter is option to select form user and when selected it can present more option or if no more option it will invoke the action is supposed to do
its like decision tree or some kind of old text game .
how to build it to be modular and open to add more selections and not to complex. it can be in any programming language i want to understand the design of the right pattern .

Aucun commentaire:

Enregistrer un commentaire