Ask coding questions

← Back to all posts
Monopoly game
juliomorenotos (28)

I am triying to make the 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:

Thank you.

Answered by pyelias (1471) [earned 5 cycles]
View Answer
pyelias (1471)

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

juliomorenotos (28)

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