Share your repls and programming experiences

← Back to all posts
Monopoly
juliomorenotos

The original monopoly board game.
It still has some functionallity missing (like buying houses and hotels).
You can play with as many players as you want.
You just have to decide when to buy properties.
If any player goes broke (money < 0) the game ends.

Voters
LuckyOreos
GrantKeo
Nanowrimoijk
mhernandezc
AlexanderGayduk
Reader8765
YeetMstr
MichelleC1
jaydah_pride
miles_iv
Comments
hotnewtop
Gh0stHack3r

Nice Game, always loved Monoply!

GrantKeo

Love it! I don't have a monopoly board at home. but can you set a limit on how many players there are (It's hard to name 123 players)

jaydah_pride

This is really cool!

RyanRana

Very impressive coding!

Noob_vn

i can play with 999 players xD

CyanCoding

Nice work! This is a very cool game! I like that you can actually play against the computer, and the AI is very fun to watch (I had 32 players play :D). Great work!

tenyiyi123

I think you can add a mode that allow the player to play with the computer when there is only 1 player

Darklordx

@juliomorenotos Maybe you could've split it up into a couple of modules (Maybe it's just me, but I like to keep my modules <200 lines), but yeah, like @Maelstrom said. It's pretty nice.
One note: the dice function is inaccurate. (i.e., a real pair of dice has 1/6 chance of rolling a 7 and a 1/36 chance of rolling a 12, but in your program all numbers have probability 1/11. I would have something like
def roll_dice(): return (random.randint(1,6),random.randint(1,6))

That way, not only do you have a realistic probability distribution but you can now also implement the roll-a-double-to-get-out-of-jail feature, the water works and electricity payment feature, etc.

I voted for you! Best of luck, darklordx

juliomorenotos

@Darklordx Hello, thank you for the comment. Totally right about the roll_dice(). I already chenged it. Thanks.

AntonioRodrigue

amazing game

Maelstrom

Best thing about this is the cleanliness. Very pretty code to look at. Not very often do you get to see pretty code that works flawlessly. +1 from me!

LightninMcQuade

Awesome!!