vortiprofits.blogg.se

Monopoly properties
Monopoly properties





monopoly properties
  1. MONOPOLY PROPERTIES GENERATOR
  2. MONOPOLY PROPERTIES CODE

Below is a breakdown of each property on a Monopoly board, given it’s situation regarding houses and hotels (excluding railroads and utilities).

monopoly properties

We also need to consider how building houses and hotels on properties affects the rolls per break-even. Properties that take less rolls to break-even would be considered better investments because you could start turning a profit before other players. For example Ventnor costs $260 to buy, so the owner should expect to make all of that money back after 439.18 rolls. If we divide the initial cost of buying the property by the revenue per roll, we can find how many rolls it will take to break-even on a property. The revenue per roll is not the best thing to compare between properties because a property that costs more than Ventnor should yield more revenue, but this is not always the case. The rent with no houses for Ventnor Ave is $22, which means that every roll results in an expected $0.59202 for the owner. We can use that, along with the rent for every property, to find the expected amount of money you will make on every player’s dice roll if you own said property.įor example, Ventnor Ave (shown above) is at a 2.691% chance of being landed on every roll. The probabilities shown above can also be described as the chances of a player landing on that property after every roll. While the amount of times a property is landed on does affect the benefit it will bring to you as a player, we also need to consider how much it costs to buy the property, and how much players will pay you every time they land on it. This gives us a percent likelihood of all 40 spaces being landed on. Of the 16 chance cards, 9 change the player’s location:Īfter every turn is over, the space that the player ended up on is tallied in an array of all 40 spots, and then each spot is divided by the total amount of simulations (10 million). Of the 16 community chest cards, only 1 changes the location of the player (go to jail). Other special case examples are community chest spaces and chance spaces. if doubles 40 % if above 40 position = position - 40 % reverts position back to starting position as a reference around = around + 1 % indicates the player went around the board end if position = 31 % if player lands on the "go to jail" space lands(position) = lands(position) + 1 % indicates player landed on position 31 position = 11 % sends player to jail end Also, if the player lands on position 31 (“go to jail” space) they are sent to position 11 (jail). A position value of 43 would be changed to 3.

monopoly properties

For example, if the position adds up to be greater than 40, it reverts it back to the starting spot as a reference since the board is a loop.

MONOPOLY PROPERTIES CODE

What follows in the code is all of the special case situations. die1 = randi(6) % roll first die die2 = randi(6) % roll second die if die1 = die2 % if same value doubles = doubles + 1 % increase number of doubles in a row else doubles = 0 % set doubles to 0 if different dice values end If the player rolls 3 doubles in a row, they are sent to jail for speeding. I also have a variable to track the amount of doubles in a row. I then add that amount on to the current position of the player to get their new position.

MONOPOLY PROPERTIES GENERATOR

I simulate two dice being rolled using a random number generator and then add the two values together.







Monopoly properties