Skip to content
Sign upLog in
← Back to Community

Monopoly game

Profile icon
juliomorenotos

I am triying to make the cards.py file to work, but when a player lands on a chance or community chest place, the game resets. Does anyone have a clue why?

here is the repl:
https://repl.it/@juliomorenotos/Monopoly

Thank you.

Answered by pyelias [earned 5 cycles]
View Answer
Voters
Profile icon
donkeyboii
Profile icon
juliomorenotos
Comments
hotnewtop
Profile icon
pyelias

When you import main, that re-runs the main.py file, including all your game code. To fix this, you could pass the things you need as arguments, or move card_chooser into main.py.

Profile icon
juliomorenotos

@pyelias
moved card_chooser to main.py and it works.
Thank you.