How to program a text adventure in C