I am building a text-based adventure game as follows: I have 2 models Node and Message, in Node will contain:
- 1 list of messages
- 1 list of branching conditions
- 1 list of child nodes
My idea is to use Listview to print to the screen and when the user interacts with the conditions the data in that listview will be updated accordingly.
The problem I have here is that if I use If - else it will take a long time to process all the cases if the plot is long. And the nodes are nested in a tree model, so it's quite complicated.
Let me know the best solution to implement it.
Thank you!