Share your repls and programming experiences

← Back to all posts
Cattle Trade
general_poxter (174)

Fun game for everyone to play :)

SuzyBuzy (0)

Very interesting game design and stuff

general_poxter (174)

@notthebees: Please don't put irrelevant content in the comments.

CyanCoding (2180)

This game is super fun! Good luck in the competition!

426729 (184)

Apples are my favorite food!

general_poxter (174)

@chrisjantzen: Sorry. I should have included instructions. So, you start off with random number of cattle, and $10000. Random companies offer you random deals for cows, but if they demand more cattle than you have and you accept the offer, then you lose (since you don't have enough cattle). Also, the price projection shows how much the price of cattle will rise or fall, so you can strategize when to buy or sell.

21natzil (1194)

I started with 11, and could never do anything for the rest of the game.

NicholasChorett (2)

nice game, but is there a way you can GET more cattle?

ChrisJantzen (2)

@generalpoxter: Why do I only start out with $1500? I see where I would change it in the code, but it says money = 1500.

426729 (184)

I had ~68k and accidentally clicked 'sell 38 cattle' when I had 18 cattle
Then I lost ;(

ChrisJantzen (2)

@generalpoxter: No, because the offers are almost always to sell for much more than that or buy more cows than you have? 1500 is no where near enough to start with

general_poxter (174)

@chrisjantzen: You have to be patient. I managed to get to 16000 very easily in about 5 minutes.

ntachev (0)

Ran up to 1/4 M and chose the wrong sale haha fun game!

rancegarrett (0)

Maybe make a python script to make the correct choices ;).

ChrisJantzen (2)

@generalpoxter: okay so before I was starting with like 15 cattle, now I'm getting like 80 so thats better. Just a side note, might want to fix it so that invalid entries don't make it move on to the next offer. Went to type "yes" but typed "ues" and it skipped to the next thing.

Geminisun (1)

This is a cool game! Unfortunately, I got up to 366 cattle before the game froze due to unknown reasons. But, that didn't bother me too much. Good job on this!

jp3 (4)

Clean code, fun to play.
I would abstract the code a bit by dividing it into functions that perform a specific task.
Some comments would be nice.

jp3 (4)

Final score:

You have $999045
You have 1647 cattle

When the game froze at line 8595

HeerokDas (14)

The price of cattle reached $1... and the only choice was for someone to buy my cattle :(

D16174L_HUN73R (0)

This game is awesome!

ChrisJantzen (2)

Maybe I don't get it.. Why does it start off offering to buy more cattle than I have and asking to sell me more cattle than I have money for? And the 1 time i was able to actually buy cattle it goes "x company was able to clone cattle driving down the price so you ran out of money"

general_poxter (174)

@chrisjantzen: In addition, the amount of money you have decreases over time, unless you sell your cattle or receive a salary, since you need to spend money to take care of your cows. So what I think happened most likely was the price of cattle decreases at the exact same time you ran out of money to maintain your cattle.

general_poxter (174)

@chrisjantzen: You should be able to handle the game with only that amount of money.

OliviaMurphy (0)

@chrisjantzen: I got 40000 very easily after about 10 minutes. Just be smart with your money.

ChrisJantzen (2)

@oliviamurphy: Well I was starting the game with 1500 dollars and like 16 cattle so it was actually impossible to play because no offer ever came that was trying to buy fewer than 16 or sell to me for less than 1500. I mustve just been getting very unlucky with the RNG a few times in a row.


after every turn could you print the player's total net worth, including the worth of the cattle? nice game btw

MarkEgan (1)

Over 1m is obtainable, but the game eventually stops. Very well programmed game (I love the randomness of events).


"Don't forget to post your score!"
What is my score?