public void Land(IPlayer player, Int32 position) { CheckForBankrupcies(); var ownableSpace = allOwnableSpaces[position]; var money = banker.Money[player]; if (Owned(ownableSpace)) { PayRent(player, ownableSpace); } else if (banker.CanAfford(player, ownableSpace.Price) && player.OwnableStrategy.ShouldBuy(money)) { Buy(player, ownableSpace); } }
public Boolean PlayerWillPayToGetOutOfJail(IPlayer player) { var money = banker.Money[player]; return(player.JailStrategy.ShouldPay(money) && banker.CanAfford(player, GameConstants.COST_TO_GET_OUT_OF_JAIL)); }