A Python framework to allow AI algorithms to compete at playing Monopoly
This project is maintained by richard-shepherd
If you have to pay rent or a fine and you do not have enough cash, you go bankrupt and are out of the game.
Any time that money will be taken from you, you are first notified via the money_will_be_taken() method. You are then given the option to make deals, sell houses and mortgage properties. It is your responsibility to do this if you need to raise money. After this, the money is taken and if you do not have enough cash, you go bankrupt.
Note that this means that you can go bankrupt even if your 'net worth' (ie, cash + properties + houses) is greater than the sum you owe. The framework will not mortgage properties or sell houses for you to raise cash to pay a debt.
Not all failures to pay money will cause you to go bankrupt. All mandatory payments such as fines or rents will cause you to go bankrupt if you can not pay. Other payments are not mandatory, such as buying properties or houses or transferring money as part of a deal. If you do not have enough money in these cases, the transaction will be 'rolled back' and you will not go bankrupt.