Share your repls and programming experiences

← Back to all posts
Lets Go Adventuring
StephenGrimes (6)

A sample of how to create your own text adventure

HarshVardhan19 (17)

You need to add a break keyword after ending() on line 28 since it kept spamming You died in the terminal. And I guess it wasn't supposed to do that.

hello4691 (31)

The screen gets filled with too much information. You should use this:

 import os
 def clear():

Calling clear() will clear the terminal.

hello4691 (31)

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.

firefish (947)

@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():

same way you do colours, except different ascii sequences

hello4691 (31)

@firefish I use it on all my repls and it works just fine

firefish (947)

@hello4691 Yes, I know. That's because is a linux system. Move your code out of and onto your native windows system and then...

Even if it DOES work, it's good practice to use the other one.

hello4691 (31)

@firefish Thanks I'll keep that in mind

RahulChoubey1 (172)

@firefish clear works on Chrome OS's os module

hello4691 (31)

@RahulChoubey1 I should probably go change that in all my repls

firefish (947)

@RahulChoubey1 because chromeos is a linux bootleg where the kernel is chrome