Share your repls and programming experiences

← Back to all posts
Jungle (Gold Rush)
426729 (153)

A game where you try to collect enough gold from day to day (by exploring and fighting monsters) to buy food to survive. For 5 days, you try to collect as much gold as possible. If you have enough gold at the end of each day, you survive until the next day and all surplus gold is kept. At the end of the 5 days, if you survived, you are scored based on your final gold score.
When you explore the jungle, you have health. You can find enemies in the jungle, and they will fight you. If they have more health than you do, then you die and wake up the next day. If you beat an enemy, it will deal half its health to you in damage.
The Snake is the easiest enemy, then comes the Wild Boar, then the Lion and then the Boa.
You will sometimes randomly find items (from bandaids to boost your health to gold) after beating enemies.
You can also find gold mines, where you can find lots of gold, but there are also cave-ins.
Make good choices (explore more, or don't) and gamble your way to safety!

Unknown9102 (2)

I have a small question, and since you happen to good at python I thought I'd ask you. It's that, how do you clear all the text from the terminal?

426729 (153)

@coder0323: I see you 'hacked' the game for yourself. Just watch out for those cave-ins!

426729 (153)

Also, make sure to indent lines 47 and 48 a bit on your version to avoid a syntax error (they need to be inside the if statement).

ayrpheli (3)

Hey, you know python more than me. is there a way to make it blink slower?

426729 (153)

@ayrpheli: I don't think there's any way built into Python, but you could just do it manually with replit.clear(), then printing the same thing (of course, with the text blinked) repeatedly. Really, though, I don't think there's a good way.

haya (5)

This is very engaging 👏

RyanBridgforth (0)

That's an up-vote, good job!

freddyamarsden (21)

If you play cautiously you win.

426729 (153)

@javacoderz1: Do you have any suggestions for the game?

ubaid_raf (0)

@426729: Allow player input to make a few choices

Eaglefang (4)

It's really hard to die. I tried and I couldn't.


how do i access it

sha0066 (0)

Is this in python 3.6?

hibird89 (0)

There is a part where it says I died (after the lion ;-;) and then I went home and payed 10 gold to eat. I don't exactly know why but it bothers me ever so slightly

426729 (153)

@hibird89: I know what you mean. The 'death' out in the jungle is a bit fake, though starvation from lack of money ends the game. Maybe I should have thought this out a bit more...