Lets Go Adventuring
A sample of how to create your own text adventure
The screen gets filled with too much information. You should use this:
import os def clear(): os.system('clear')
Calling clear() will clear the terminal.
Also @StephenGrimes creating scenarios in a format like this is very hard and time consuming. You should make a class. With the instances being scenarios.
@hello4691 Actually, that is a bad idea, because on a windows system clear is not a command, cls is. So for one that works on both:
def clear(): print('\033[H\033[2J')
same way you do colours, except different ascii sequences
@hello4691 Yes, I know. That's because repl.it is a linux system. Move your code out of repl.it and onto your native windows system and then...
Even if it DOES work, it's good practice to use the other one.
@firefish clear
works on Chrome OS
's os
module
@RahulChoubey1 I should probably go change that in all my repls
@RahulChoubey1 because chromeos is a linux bootleg where the kernel is chrome
You need to add a
break
keyword afterending()
on line 28 since it kept spammingYou died
in the terminal. And I guess it wasn't supposed to do that.