Jun-15-2018, 06:13 PM
This is the classic way for a beginning programmer to write a text adventure, and it is fraught with problems. The whole if/elif/then structure is very cumbersome, repetitive, and hard to scale up (expand).
A better way is to use a dictionary or other data structure that contains the information about the locations, and a single program structure that works its way through that dictionary. There is a link in my signature to a text adventure tutorial that shows you how to do exactly that. I would recommend reading that, and then trying to redo your adventure using that method.
A better way is to use a dictionary or other data structure that contains the information about the locations, and a single program structure that works its way through that dictionary. There is a link in my signature to a text adventure tutorial that shows you how to do exactly that. I would recommend reading that, and then trying to redo your adventure using that method.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures